diff --git a/report-core/pom.xml b/report-core/pom.xml
index 9f17ec69..fc1d8bd7 100644
--- a/report-core/pom.xml
+++ b/report-core/pom.xml
@@ -42,6 +42,12 @@
test
+
+ org.springframework.cloud
+ spring-cloud-context
+ 2.2.6.RELEASE
+
+
com.anji-plus
spring-boot-gaea
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java
index 2465f8da..9771a70b 100644
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java
+++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/file/service/impl/GaeaFileServiceImpl.java
@@ -44,16 +44,16 @@ import java.util.stream.Collectors;
@Slf4j
public class GaeaFileServiceImpl implements GaeaFileService {
- @Value("${file.dist-path:''}")
+ @Value("${customer.file.dist-path:''}")
private String dictPath;
- @Value("${file.white-list:''}")
+ @Value("${customer.file.white-list:''}")
private String whiteList;
- @Value("${file.excelSuffix:''}")
+ @Value("${customer.file.excelSuffix:''}")
private String excelSuffix;
- @Value("${file.downloadPath:''}")
+ @Value("${customer.file.downloadPath:''}")
private String fileDownloadPath;
@Autowired
diff --git a/report-core/src/main/resources/bootstrap-dev.yml b/report-core/src/main/resources/bootstrap-dev.yml
index b9ccfea2..339156c6 100644
--- a/report-core/src/main/resources/bootstrap-dev.yml
+++ b/report-core/src/main/resources/bootstrap-dev.yml
@@ -1,83 +1,10 @@
-server:
- port: 9095
- servlet:
- encoding:
- charset: UTF-8
- force: true
- enabled: true
-# servlet:
-# context-path: /business
+# 该文件配置会继承bootstrap.xml,只需要配置数据库等差异配置
spring:
- application:
- name: aj-report
- #上传图片大小限制为10MB
- servlet:
- multipart:
- max-file-size: 10MB
- # cloud:
-# nacos:
-# server-addr: 10.108.26.121:8848,10.108.26.145:8848
-# username: gaea
-# password: p@ss1234
-# config:
-# namespace: 5c6b6687-ad43-450f-88b6-e704ff78d83f
-# file-extension: yaml
-# discovery:
-# namespace: 5c6b6687-ad43-450f-88b6-e704ff78d83f
- jackson:
- date-format: yyyy-MM-dd HH:mm:ss
- messages:
- basename: i18n/messages
datasource:
url: jdbc:mysql://10.108.26.197:3306/aj_report?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: appuser@anji
-# 禁用redis,使用ehcache
-# redis:
-# host: 10.108.26.197
-# port: 6379
-# password: appuser@anji
-# database: 1
-
- flyway:
- baseline-on-migrate: true
- #数据库连接配置
- url: ${spring.datasource.url}
- user: ${spring.datasource.username}
- password: ${spring.datasource.password}
- placeholder-replacement: false
- init-sqls:
- - CREATE DATABASE IF NOT EXISTS `aj_report` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
-generator:
- enabled: true
- workspace: /workspace/gaea
- templatePath: template
-mybatis-plus:
- configuration:
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
- call-setters-on-nulls: true
- mapperLocations:
- - classpath*:/mapper/**/*.xml
- - classpath*:/modeler-mybatis-mappings/**/*.xml
-
-management:
- endpoints:
- web:
- base-path: /
-logging:
- config: classpath:logback.xml
-file:
- #上传对应本地全路径
- dist-path: /app/disk/upload/
- white-list: .png|.jpg|.gif|.icon|.pdf|.xlsx|.xls|.csv|.mp4|.avi
- excelSuffix: .xlsx|.xls|.csv
- #上传对应下载的下载链接路径 http://serverip:9095/file/download
- downloadPath: http://10.108.26.197:9095/file/download
customer:
- # 跳过token验证和权限验证的url清单
- skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html
- user:
- ##新增用户默认密码
- default:
- password: 123456
+ file:
+ dist-path: D:\Workspace\AJ-Report\report-core\upload
\ No newline at end of file
diff --git a/report-core/src/main/resources/bootstrap-prod.yml b/report-core/src/main/resources/bootstrap-prod.yml
index 9aac201b..17071c3d 100644
--- a/report-core/src/main/resources/bootstrap-prod.yml
+++ b/report-core/src/main/resources/bootstrap-prod.yml
@@ -1,21 +1,10 @@
+# 该文件配置会继承bootstrap.xml,只需要配置数据库等差异配置
spring:
- application:
- name: gaea-business
- cloud:
- nacos:
- server-addr: 10.108.142.118:8848
- username: gaea
- password: p@ss1234
- config:
- namespace: fe5a998f-1149-4f55-aa83-e7552279058c
- file-extension: yaml
- discovery:
- namespace: fe5a998f-1149-4f55-aa83-e7552279058c
-generator:
- enabled: false
- workspace: /workspace/gaea
- templatePath: template
-
+ datasource:
+ url: jdbc:mysql://10.108.26.197:3306/aj_report?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+ username: root
+ password: appuser@anji
+
customer:
- # 跳过token验证和权限验证的url清单
- skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html
\ No newline at end of file
+ file:
+ dist-path: /app/disk/upload/
\ No newline at end of file
diff --git a/report-core/src/main/resources/bootstrap.yml b/report-core/src/main/resources/bootstrap.yml
index c1b88b31..363a01ac 100644
--- a/report-core/src/main/resources/bootstrap.yml
+++ b/report-core/src/main/resources/bootstrap.yml
@@ -1,9 +1,66 @@
+server:
+ port: 9095
+ servlet:
+ encoding:
+ charset: UTF-8
+ force: true
+ enabled: true
+
spring:
profiles:
active: dev
+ application:
+ name: aj-report
+ servlet:
+ multipart:
+ max-file-size: 10MB #上传图片大小限制为10MB
+ jackson:
+ date-format: yyyy-MM-dd HH:mm:ss
+ messages:
+ basename: i18n/messages
+ datasource:
+ url: jdbc:mysql://10.108.26.197:3306/aj_report?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+ username: root
+ password: appuser@anji
+ flyway:
+ baseline-on-migrate: true
+ #数据库连接配置
+ url: ${spring.datasource.url}
+ user: ${spring.datasource.username}
+ password: ${spring.datasource.password}
+ placeholder-replacement: false
+ init-sqls:
+ - CREATE DATABASE IF NOT EXISTS `aj_report` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+ call-setters-on-nulls: true
+ mapperLocations:
+ - classpath*:/mapper/**/*.xml
+ - classpath*:/modeler-mybatis-mappings/**/*.xml
+management:
+ endpoints:
+ web:
+ base-path: /
logging:
config: classpath:logback.xml
-generator:
- tableExclude:
- mysql: "AND table_name not like 'gaea_%' AND table_name not like 'ACT_%'"
+
+# 本应用自定义参数
+customer:
+ # 开发测试用本地文件,如果是生产,请考虑使用对象存储
+ file:
+ #上传对应本地全路径
+ dist-path: /app/disk/upload/
+ white-list: .png|.jpg|.gif|.icon|.pdf|.xlsx|.xls|.csv|.mp4|.avi
+ excelSuffix: .xlsx|.xls|.csv
+ #上传对应下载的下载链接路径 http://serverip:9095/file/download
+ downloadPath: http://10.108.26.197:9095/file/download
+
+ # 跳过token验证和权限验证的url清单
+ skip-authenticate-urls: /gaeaDict/all, /login, /static, /file/download/, /index.html
+ user:
+ ##新增用户默认密码
+ default:
+ password: 123456