微服务配置的修改

This commit is contained in:
zer0Black
2022-04-09 23:27:20 +08:00
parent b11a0aafc0
commit f43631675f
21 changed files with 491 additions and 364 deletions
@@ -13,7 +13,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* @Description 单体应用启动类
* @Description 单体应用启动类,若为微服务启动,可删掉该模块
* @Author zero
* @Date 2021/3/15
**/
@@ -14,16 +14,16 @@ server:
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
management:
endpoints:
web:
exposure:
include: metrics,httptrace
endpoints:
web:
exposure:
include: metrics,httptrace
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
multipart:
max-file-size: 10MB
max-request-size: 10MB
mail:
host: smtp.163.com
username: test@163.com
@@ -135,10 +135,10 @@ spring:
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# username: root
# password: 123456
# driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# username: root
# password: 123456
# driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
#multi-datasource1:
#url: jdbc:mysql://localhost:3306/jero-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
@@ -158,6 +158,25 @@ spring:
shutdown-timeout: 100ms
password: 'hzwlsoft.com'
port: 4780
#rabbitmq 配置
rabbitmq:
host: 121.36.69.172
username: admin
password: hzwlsoft.com
port: 5672
publisher-confirm-type: correlated
publisher-returns: true
virtual-host: /
listener:
simple:
acknowledge-mode: manual
#消费者的最小数量
concurrency: 1
#消费者的最大数量
max-concurrency: 1
#是否支持重试
retry:
enabled: true
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:com/jero/**/xml/*Mapper.xml
@@ -246,8 +265,8 @@ jero :
data-type: yml
#分布式锁配置
redisson:
address: 127.0.0.1:4780
password:
address: 121.36.69.172:4780
password: 'hzwlsoft.com'
type: STANDALONE
enabled: true
# 文件限制后缀黑名单
@@ -14,16 +14,16 @@ server:
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
management:
endpoints:
web:
exposure:
include: metrics,httptrace
endpoints:
web:
exposure:
include: metrics,httptrace
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
multipart:
max-file-size: 10MB
max-request-size: 10MB
mail:
host: smtp.163.com
username: test@163.com
@@ -118,7 +118,7 @@ spring:
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
@@ -133,8 +133,12 @@ spring:
master:
url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# username: root
# password: 123456
# driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
#multi-datasource1:
#url: jdbc:mysql://localhost:3306/jero-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
@@ -143,8 +147,8 @@ spring:
#driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0
host: 127.0.0.1
database: 3
host: 121.36.69.172
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
@@ -152,8 +156,27 @@ spring:
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: ''
password: 'hzwlsoft.com'
port: 4780
#rabbitmq 配置
rabbitmq:
host: 121.36.69.172
username: admin
password: hzwlsoft.com
port: 5672
publisher-confirm-type: correlated
publisher-returns: true
virtual-host: /
listener:
simple:
acknowledge-mode: manual
#消费者的最小数量
concurrency: 1
#消费者的最大数量
max-concurrency: 1
#是否支持重试
retry:
enabled: true
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:com/jero/**/xml/*Mapper.xml
@@ -167,7 +190,7 @@ mybatis-plus:
table-underline: true
configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true
#jero专用配置
@@ -175,26 +198,26 @@ jero :
# 签名密钥串(前后端要一致,正式发布请自行修改)
signatureSecret: dd05f1c54d63749eda95f9fa6d49v442a
# 本地:local\Miniominio\阿里云:alioss
uploadType: alioss
uploadType: local
path :
#文件上传根目录 设置
upload: /opt/jero-boot/upload
upload: D://opt//upFiles
#webapp文件路径
webapp: /opt/jero-boot/webapp
webapp: D://opt//webapp
shiro:
excludeUrls: /test/jeroDemo/demo3,/test/jeroDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
excludeUrls: /test/jeroDemo/demo3,/test/jeroDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
#阿里云oss存储配置
oss:
endpoint: oss-cn-beijing.aliyuncs.com
accessKey: ??
secretKey: ??
endpoint: oss-cn-beijing.aliyuncs.com
bucketName: jero
staticDomain: https://static.jero.com
# ElasticSearch 设置
bucketName: jeroos
staticDomain: jerodev
# ElasticSearch 6设置
elasticsearch:
cluster-name: jero-ES
cluster-nodes: ??
check-enabled: true
cluster-nodes: 127.0.0.1:9200
check-enabled: false
# 表单设计器配置
desform:
# 主题颜色(仅支持 16进制颜色代码)
@@ -202,7 +225,7 @@ jero :
# 文件、图片上传方式,可选项:qiniu(七牛云)、system(跟随系统配置)
upload-type: system
# 在线预览文件服务器地址配置
file-view-domain: http://fileview.jero.com
file-view-domain: 127.0.0.1:8012
# minio文件上传
minio:
minio_url: http://minio.jero.com
@@ -211,18 +234,18 @@ jero :
bucketName: otatest
#大屏报表参数设置
jmreport:
mode: prod
mode: dev
#数据字典是否可以全局看到
saas: false
#是否需要校验token
is_verify_token: true
is_verify_token: false
#必须校验方法
verify_methods: remove,delete,save,add,update
#Wps在线文档
wps:
domain: https://wwo.wps.cn/office/
appid: true
appsecret: true
appid: ??
appsecret: ??
#xxl-job配置
xxljob:
enabled: false
@@ -242,8 +265,8 @@ jero :
data-type: yml
#分布式锁配置
redisson:
address: 127.0.0.1:4780
password:
address: 121.36.69.172:4780
password: 'hzwlsoft.com'
type: STANDALONE
enabled: true
# 文件限制后缀黑名单
@@ -262,9 +285,9 @@ knife4j:
#开启增强配置
enable: true
#开启生产环境屏蔽
production: true
production: false
basic:
enable: true
enable: false
username: jero
password: jero.com
#第三方登录
@@ -285,10 +308,10 @@ justauth:
client-secret: true
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/dingtalk/callback
WECHAT_OPEN:
client-id: true
client-secret: true
client-id: ??
client-secret: ??
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_open/callback
cache:
type: default
prefix: 'demo::'
timeout: 1h
timeout: 1h
@@ -14,16 +14,16 @@ server:
mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
management:
endpoints:
web:
exposure:
include: metrics,httptrace
endpoints:
web:
exposure:
include: metrics,httptrace
spring:
servlet:
multipart:
max-file-size: 10MB
max-request-size: 10MB
multipart:
max-file-size: 10MB
max-request-size: 10MB
mail:
host: smtp.163.com
username: test@163.com
@@ -65,16 +65,16 @@ spring:
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
aop:
proxy-target-class: true
jpa:
open-in-view: false
activiti:
check-process-definitions: false
#启用作业执行器
async-executor-activate: false
#启用异步执行器
job-executor-activate: false
jpa:
open-in-view: false
aop:
proxy-target-class: true
#配置freemarker
freemarker:
# 设置模板后缀名
@@ -118,7 +118,7 @@ spring:
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
@@ -130,42 +130,65 @@ spring:
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
master:
url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
# url: jdbc:mysql://127.0.0.1:3306/jero-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# username: root
# password: 123456
# driver-class-name: com.mysql.cj.jdbc.Driver
# 多数据源配置
#multi-datasource1:
#url: jdbc:mysql://localhost:3306/jero-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
#username: root
#password: root
#driver-class-name: com.mysql.cj.jdbc.Driver
#url: jdbc:mysql://localhost:3306/jero-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
#username: root
#password: root
#driver-class-name: com.mysql.cj.jdbc.Driver
#redis 配置
redis:
database: 0
host: 192.168.1.199
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: ''
port: 4780
database: 3
host: 121.36.69.172
lettuce:
pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms
password: 'hzwlsoft.com'
port: 4780
#rabbitmq 配置
rabbitmq:
host: 121.36.69.172
username: admin
password: hzwlsoft.com
port: 5672
publisher-confirm-type: correlated
publisher-returns: true
virtual-host: /
listener:
simple:
acknowledge-mode: manual
#消费者的最小数量
concurrency: 1
#消费者的最大数量
max-concurrency: 1
#是否支持重试
retry:
enabled: true
#mybatis plus 设置
mybatis-plus:
mapper-locations: classpath*:com/jero/**/xml/*Mapper.xml
global-config:
mapper-locations: classpath*:com/jero/**/xml/*Mapper.xml
global-config:
# 关闭MP3.0自带的banner
banner: false
db-config:
#主键类型
#主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
id-type: ASSIGN_ID
# 默认数据库表下划线命名
table-underline: true
configuration:
configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
@@ -182,18 +205,18 @@ jero :
#webapp文件路径
webapp: D://opt//webapp
shiro:
excludeUrls: /test/jeroDemo/demo3,/test/jeroDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
excludeUrls: /test/jeroDemo/demo3,/test/jeroDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/**
#阿里云oss存储配置
oss:
endpoint: oss-cn-beijing.aliyuncs.com
accessKey: ??
secretKey: ??
bucketName: jeroos
staticDomain: https://static.jero.com
# ElasticSearch 设置
staticDomain: jerodev
# ElasticSearch 6设置
elasticsearch:
cluster-name: jero-ES
cluster-nodes: ??
cluster-nodes: 127.0.0.1:9200
check-enabled: false
# 表单设计器配置
desform:
@@ -202,7 +225,7 @@ jero :
# 文件、图片上传方式,可选项:qiniu(七牛云)、system(跟随系统配置)
upload-type: system
# 在线预览文件服务器地址配置
file-view-domain: http://127.0.0.1:8012
file-view-domain: 127.0.0.1:8012
# minio文件上传
minio:
minio_url: http://minio.jero.com
@@ -211,7 +234,7 @@ jero :
bucketName: otatest
#大屏报表参数设置
jmreport:
mode: prod
mode: dev
#数据字典是否可以全局看到
saas: false
#是否需要校验token
@@ -239,24 +262,24 @@ jero :
data-id: jero-gateway-router
group: DEFAULT_GROUP
#自定义路由配置 yml nacos database
data-type: database
data-type: yml
#分布式锁配置
redisson:
address: 127.0.0.1:4780
password:
address: 121.36.69.172:4780
password: 'hzwlsoft.com'
type: STANDALONE
enabled: true
# 文件限制后缀黑名单
fileSuffixLimits : 0x00,%00,\\00,.jsp,.exe,.php,.asp,.aspx,.jspx,.xml,.html,.js,.sh,.bin
# 跨站白名单
whiteUrls:
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas
#Mybatis输出sql日志
logging:
level:
com.jero.modules.system.mapper : info
#cas单点登录
cas:
prefixUrl: http://cas.example.org:8443/cas
#swagger
knife4j:
#开启增强配置
@@ -272,17 +295,17 @@ justauth:
enabled: true
type:
GITHUB:
client-id: ??
client-secret: ??
client-id: true
client-secret: true
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/github/callback
WECHAT_ENTERPRISE:
client-id: ??
client-secret: ??
client-id: true
client-secret: true
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/wechat_enterprise/callback
agent-id: 1000002
DINGTALK:
client-id: ??
client-secret: ??
client-id: true
client-secret: true
redirect-uri: http://sso.test.com:8080/jero-boot/sys/thirdLogin/dingtalk/callback
WECHAT_OPEN:
client-id: ??