From 7da1292da8d367627b8bf95247c0e02e5667b781 Mon Sep 17 00:00:00 2001 From: mashuai Date: Tue, 13 Aug 2024 09:43:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=B5=84=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bonus-modules/bonus-material/pom.xml | 120 ++++++++++++++++++ .../material/BonusMaterialApplication.java | 33 +++++ .../src/main/resources/banner.txt | 9 ++ .../src/main/resources/bootstrap.yml | 54 ++++++++ .../src/main/resources/logback.xml | 74 +++++++++++ bonus-modules/pom.xml | 1 + 6 files changed, 291 insertions(+) create mode 100644 bonus-modules/bonus-material/pom.xml create mode 100644 bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java create mode 100644 bonus-modules/bonus-material/src/main/resources/banner.txt create mode 100644 bonus-modules/bonus-material/src/main/resources/bootstrap.yml create mode 100644 bonus-modules/bonus-material/src/main/resources/logback.xml diff --git a/bonus-modules/bonus-material/pom.xml b/bonus-modules/bonus-material/pom.xml new file mode 100644 index 0000000..f95de1b --- /dev/null +++ b/bonus-modules/bonus-material/pom.xml @@ -0,0 +1,120 @@ + + + + bonus-modules + com.bonus + 24.7.1-SNAPSHOT + + 4.0.0 + + bonus-material + + + bonus-modules-base物资管理模块 + + + + 8 + 8 + UTF-8 + + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + com.mysql + mysql-connector-j + + + + + com.bonus + bonus-common-datasource + + + + + com.bonus + bonus-common-datascope + + + + + com.bonus + bonus-common-log + + + + + com.bonus + bonus-common-swagger + + + + com.google.guava + guava + 30.0-jre + compile + + + + + org.projectlombok + lombok + provided + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + \ No newline at end of file diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java new file mode 100644 index 0000000..da8540e --- /dev/null +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java @@ -0,0 +1,33 @@ +package com.bonus.material; + +import com.bonus.common.security.annotation.EnableCustomConfig; +import com.bonus.common.security.annotation.EnableRyFeignClients; +import com.bonus.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; + +/** + * 物资管理模块 + * @author ma_sh + */ + +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableRyFeignClients +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class }) +public class BonusMaterialApplication { + public static void main(String[] args) { + SpringApplication.run(BonusMaterialApplication.class, args); + System.out.println("(♥◠‿◠)ノ゙ bonus-material物资管理模块启动成功 ლ(´ڡ`ლ)゙ \n" + + " .-------. ____ __ \n" + + " | _ _ \\ \\ \\ / / \n" + + " | ( ' ) | \\ _. / ' \n" + + " |(_ o _) / _( )_ .' \n" + + " | (_,_).' __ ___(_ o _)' \n" + + " | |\\ \\ | || |(_,_)' \n" + + " | | \\ `' /| `-' / \n" + + " | | \\ / \\ / \n" + + " ''-' `'-' `-..-' "); + } +} \ No newline at end of file diff --git a/bonus-modules/bonus-material/src/main/resources/banner.txt b/bonus-modules/bonus-material/src/main/resources/banner.txt new file mode 100644 index 0000000..bf6f561 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/resources/banner.txt @@ -0,0 +1,9 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} + _ + | | + | |__ ___ _ __ _ _ ___ + | '_ \ / _ \ | '_ \ | | | | / __| + | |_) | | (_) | | | | | | |_| | \__ \ + |_.__/ \___/ |_| |_| \__,_| |___/ + diff --git a/bonus-modules/bonus-material/src/main/resources/bootstrap.yml b/bonus-modules/bonus-material/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..5fa8fec --- /dev/null +++ b/bonus-modules/bonus-material/src/main/resources/bootstrap.yml @@ -0,0 +1,54 @@ +# Tomcat +server: + port: 18089 + +# Spring +spring: + redis: + host: 192.168.0.56 + port: 6379 + datasource: + druid: + stat-view-servlet: + enabled: true + loginUsername: admin + loginPassword: Bonus@Max2024 + dynamic: + strict: false + primary: master + datasource: + master: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://192.168.0.56:3306/bns-smartwh?allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false + username: Bonus@git + password: Passw0rd! + two: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql:///192.168.0.56:3306/bns-smartwh?allowMultiQueries=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false + username: Bonus@git + password: Passw0rd! + servlet: + multipart: + max-file-size: 5GB + max-request-size: 5GB + application: + # 应用名称 + name: bonus-material + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 127.0.0.1:8848 + namespace: 693e01a9-1dc4-4858-b1ae-439da3d35f66 + config: + # 配置中心地址 + server-addr: 127.0.0.1:8848 + namespace: 693e01a9-1dc4-4858-b1ae-439da3d35f66 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} diff --git a/bonus-modules/bonus-material/src/main/resources/logback.xml b/bonus-modules/bonus-material/src/main/resources/logback.xml new file mode 100644 index 0000000..313f723 --- /dev/null +++ b/bonus-modules/bonus-material/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bonus-modules/pom.xml b/bonus-modules/pom.xml index f777a48..c77212a 100644 --- a/bonus-modules/pom.xml +++ b/bonus-modules/pom.xml @@ -17,6 +17,7 @@ bonus-obs bonus-mongodb bonus-base + bonus-material bonus-modules