springBoot多数据源配置
server:
port: 8088
tomcat:
max-threads: 1000
min-spare-threads: 30
spring:
#应用名称
application:
# 与license 进行对应 临时license是cuddemo
name
http:
multipart:
max-file-size: 500MB #上传文件设置 单个文件大小100M
max-request-size: 500MB #总上传的数据大小100M
#多语言配置目录
messages:
basename: i18n/messages
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
cache:
type: simple
thymeleaf:
#prefix: /WEB-INF/templates/
suffix: .html
mode: HTML5
# 多数据源配置
datasource:
driverClassName: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
dynamic:
primary: mysql
datasource:
mysql:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://ip:端口/库名?&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&failOverReadOnly=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: ussuser
# password: sm4(1879:S/fauSBdCktF2OY7TVFHQgn/Ggo=)
password: x)6y8-hZvYYY}GjClRX4
# dm:
# driver-class-name: dm.jdbc.driver.DmDriver
# url: jdbc:dm://ip:端口
# username:
## password:
# password: sm4(1879:YbjepUkwWlNl6NEY)
druid:
initial-size: 10
max-active: 20
min-idle: 10
max-wait: 60000
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 10
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 300000
validation-query: SELECT 1
test-while-idle: true
test-on-borrow: false
test-on-return: false
filter:
stat:
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
config:
enabled: false
#druid公钥 config.decrypt=false 表示不使用druid加密
key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKms1ctmezXkUd7vQ5BhVkuFr0xQM032o323URadBOpKyWxPIDek/kcEEsryferiIqHOTSR2tNinmSIuwLNrVXkCAwEAAQ==
# connection-properties: config.decrypt=false;config.decrypt.key=${spring.datasource.druid.filter.config.key}
stat-view-servlet:
enabled: false
url-pattern: /druid*.xml,classpath:/mapper*
# shiro注解,每次接口请求会走UAU微服务,可以设置成true
enableCache: false
# vue-list: {a: "http://localhost:8010",b: "http://localhost:9090"}
#集团统一授权配置 记得申请统一授权微服务
uau:
# url是调用微服务的地址 -t 表示测试环境 -p表示预生产环境 http://aepgw 为正式环境
url:
# name 表示 你在uau系统上注册的系统编码
name: KDWX-CNPEC
# shiro登陆模式 需要自己提供用户名和密码
shiro:
#跨域配置
allowed_origin: http://localhost:8088/
#基本静态过滤规则
filter-rules[0]: /login-->anon
filter-rules[1]: /module/person1*
# shiro注解,每次接口请求会走UAU微服务,可以设置成true
cachingEnabled: false
#登陆模式 4种模式请用 aep 域帐号单点登陆。4A登录 auth2|jud登录|form(shiro)登录|单点登录配置(aep)
login-mode: aep
security:
#安全相关过滤器,请申请CUD配置微服务,用于控制文件上传类型
filters:
csrf:
allowHeaders: authorization,Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,token
# 允许过滤的请求域名
allowOrigins: http://localhost:8080,http://localhost:8081,http://localhost:8010,http://localhost:8088
file:
excludes: /login,/logout
#允许上传的文件扩展名
extensions: png,jpg,jpeg,doc,docx,xls,xlsx,pdf,apk,txt,ppt,pptx,zip,rar,msg,mp3,mp4,tmp,PNG,JPG,JPEG,DOC,DOCX,XLS,XLSX,PDF,APK,TXT,PPT,PPTX,ZIP,RAR,MSG,MP3,MP4,TMP
#文件扩展名黑名单
blockExtensions: sh,js,cmd,bat
#上传文件最大限制单位M
maxSize: 100
xss:
excludes: /login,/getUserList,/test/testFilter
xxe:
attributes: SYSTEM
excludes: /login,/logout
#审计日志过滤拦截,以英文逗号分隔
audit:
excludes: /monitor/ind/collect
#中台的鉴权信息配置,注意要申请应用接入中台和应用申请微服务
aep:
# 应用中心配置
appcenter:
# 租户配置
tenantId: 1
tenantCode:
tenantName:
# 应用配置 这里请替换成你们自己的鉴权信息
appId: KDWX-CNPEC
appCode: KDWX-CNPEC
appName:
appKey:
appSecret:
appIdParam:
#调用微服务环境配置,test表示调用测试环境的微服务,stage表示预生产/灰度环境,online表示生产环境,
#在com.cgnpc.framework.utils.CgnHeader.java 可以看到,调用微服务会用到CgnHeader.getUrl(active)
active: test
#sm4 属性,配置文件敏感信息加密,可以在target 里面看到效果
sm4:
#sm4服务器ip地址
host: 10.100.6.153
#sm4服务器端口
port: 8080
#uuid 这个可以自定义
uuid: kdwx-cnpec-20230509
#加密的属性 可以用,逗号对多个进行加密
# props: spring.datasource.druid.password ,dm.password
props: spring.datasource.dynamic.datasource.dm.password
#访问钉钉接口内外网的具体路径
dingtalk:
#内网 生产环境
#url: http://newmobileapp.gnpjvc.cgnpc.com.cn:8020
#内网 测试环境
url: http://mobileapptest.gnpjvc.cgnpc.com.cn:8020
#外网
#url: https://oapi.dingtalk.com/
agentId: 1958263548
processCode: PROC-DBB55DEC-BB3B-4E34-AE3E-CF944D340F63