update 删除一些基本用不上的配置 简化折叠一些配置

This commit is contained in:
疯狂的狮子li 2022-04-22 12:16:03 +08:00
parent 4902276921
commit 70c1a37bbd
5 changed files with 103 additions and 192 deletions

View File

@ -1,41 +1,34 @@
--- # 监控配置 --- # 监控中心配置
spring: spring.boot.admin.client:
boot: # 增加客户端开关
admin: enabled: true
# Spring Boot Admin Client 客户端的相关配置 url: http://localhost:9090/admin
client: instance:
# 增加客户端开关 service-host-type: IP
enabled: true username: ruoyi
# 设置 Spring Boot Admin Server 地址 password: 123456
url: http://localhost:9090/admin
instance:
service-host-type: IP
username: ruoyi
password: 123456
--- # xxl-job 配置 --- # xxl-job 配置
xxl: xxl.job:
job: # 执行器开关
# 执行器开关 enabled: true
enabled: true # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。 admin-addresses: http://localhost:9100/xxl-job-admin
admin-addresses: http://localhost:9100/xxl-job-admin # 执行器通讯TOKEN非空时启用
# 执行器通讯TOKEN非空时启用 access-token: xxl-job
access-token: xxl-job executor:
# 执行器配置 # 执行器AppName执行器心跳注册分组依据为空则关闭自动注册
executor: appname: xxl-job-executor
# 执行器AppName执行器心跳注册分组依据为空则关闭自动注册 # 执行器端口号 执行器从9101开始往后写
appname: xxl-job-executor port: 9101
# 执行器端口号 执行器从9101开始往后写 # 执行器注册默认IP:PORT
port: 9101 address:
# 执行器注册默认IP:PORT # 执行器IP默认自动获取IP
address: ip:
# 执行器IP默认自动获取IP # 执行器运行日志文件存储磁盘路径
ip: logpath: ./logs/xxl-job
# 执行器运行日志文件存储磁盘路径 # 执行器日志文件保存天数大于3生效
logpath: ./logs/xxl-job logretentiondays: 30
# 执行器日志文件保存天数大于3生效
logretentiondays: 30
--- # 数据源配置 --- # 数据源配置
spring: spring:
@ -106,29 +99,27 @@ spring:
filters: stat filters: stat
--- # druid 配置 --- # druid 配置
spring: spring.datasource.druid:
datasource: webStatFilter:
druid: enabled: true
webStatFilter: statViewServlet:
enabled: true enabled: true
statViewServlet: # 设置白名单,不填则允许所有访问
enabled: true allow:
# 设置白名单,不填则允许所有访问 url-pattern: /druid/*
allow: # 控制台管理用户名和密码
url-pattern: /druid/* login-username: ruoyi
# 控制台管理用户名和密码 login-password: 123456
login-username: ruoyi filter:
login-password: 123456 stat:
filter: enabled: true
stat: # 慢SQL记录
enabled: true log-slow-sql: true
# 慢SQL记录 slow-sql-millis: 1000
log-slow-sql: true merge-sql: true
slow-sql-millis: 1000 wall:
merge-sql: true config:
wall: multi-statement-allow: true
config:
multi-statement-allow: true
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉) --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
spring: spring:
@ -151,8 +142,6 @@ redisson:
threads: 4 threads: 4
# Netty线程池数量 # Netty线程池数量
nettyThreads: 8 nettyThreads: 8
# 传输模式
transportMode: "NIO"
# 单节点配置 # 单节点配置
singleServerConfig: singleServerConfig:
# 客户端名称 # 客户端名称
@ -165,9 +154,5 @@ redisson:
idleConnectionTimeout: 10000 idleConnectionTimeout: 10000
# 命令等待超时,单位:毫秒 # 命令等待超时,单位:毫秒
timeout: 3000 timeout: 3000
# 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
retryAttempts: 3
# 命令重试发送时间间隔,单位:毫秒
retryInterval: 1500
# 发布和订阅连接池大小 # 发布和订阅连接池大小
subscriptionConnectionPoolSize: 50 subscriptionConnectionPoolSize: 50

View File

@ -1,48 +1,37 @@
--- # 配置临时路径存储 --- # 临时文件存储位置 避免临时文件被系统清理报错
spring: spring.servlet.multipart.location: /ruoyi/server/temp
servlet:
multipart:
# 临时文件存储位置 避免临时文件被系统清理报错
location: /ruoyi/server/temp
--- # 监控配置 --- # 监控中心配置
spring: spring.boot.admin.client:
boot: # 增加客户端开关
admin: enabled: true
# Spring Boot Admin Client 客户端的相关配置 url: http://172.30.0.90:9090/admin
client: instance:
# 增加客户端开关 service-host-type: IP
enabled: true username: ruoyi
# 设置 Spring Boot Admin Server 地址 password: 123456
url: http://172.30.0.90:9090/admin
instance:
service-host-type: IP
username: ruoyi
password: 123456
--- # xxl-job 配置 --- # xxl-job 配置
xxl: xxl.job:
job: # 执行器开关
# 执行器开关 enabled: true
enabled: true # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。 admin-addresses: http://172.30.0.92:9100/xxl-job-admin
admin-addresses: http://172.30.0.92:9100/xxl-job-admin # 执行器通讯TOKEN非空时启用
# 执行器通讯TOKEN非空时启用 access-token: xxl-job
access-token: xxl-job executor:
# 执行器配置 # 执行器AppName执行器心跳注册分组依据为空则关闭自动注册
executor: appname: xxl-job-executor
# 执行器AppName执行器心跳注册分组依据为空则关闭自动注册 # 执行器端口号 执行器从9101开始往后写
appname: xxl-job-executor port: 9101
# 执行器端口号 执行器从9101开始往后写 # 执行器注册默认IP:PORT
port: 9101 address:
# 执行器注册默认IP:PORT # 执行器IP默认自动获取IP
address: ip:
# 执行器IP默认自动获取IP # 执行器运行日志文件存储磁盘路径
ip: logpath: ./logs/xxl-job
# 执行器运行日志文件存储磁盘路径 # 执行器日志文件保存天数大于3生效
logpath: ./logs/xxl-job logretentiondays: 30
# 执行器日志文件保存天数大于3生效
logretentiondays: 30
--- # 数据源配置 --- # 数据源配置
spring: spring:
@ -113,29 +102,27 @@ spring:
filters: stat filters: stat
--- # druid 配置 --- # druid 配置
spring: spring.datasource.druid:
datasource: webStatFilter:
druid: enabled: true
webStatFilter: statViewServlet:
enabled: true enabled: true
statViewServlet: # 设置白名单,不填则允许所有访问
enabled: true allow:
# 设置白名单,不填则允许所有访问 url-pattern: /druid/*
allow: # 控制台管理用户名和密码
url-pattern: /druid/* login-username: ruoyi
# 控制台管理用户名和密码 login-password: 123456
login-username: ruoyi filter:
login-password: 123456 stat:
filter: enabled: true
stat: # 慢SQL记录
enabled: true log-slow-sql: true
# 慢SQL记录 slow-sql-millis: 1000
log-slow-sql: true merge-sql: true
slow-sql-millis: 1000 wall:
merge-sql: true config:
wall: multi-statement-allow: true
config:
multi-statement-allow: true
--- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉) --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
spring: spring:
@ -158,8 +145,6 @@ redisson:
threads: 16 threads: 16
# Netty线程池数量 # Netty线程池数量
nettyThreads: 32 nettyThreads: 32
# 传输模式
transportMode: "NIO"
# 单节点配置 # 单节点配置
singleServerConfig: singleServerConfig:
# 客户端名称 # 客户端名称
@ -172,9 +157,5 @@ redisson:
idleConnectionTimeout: 10000 idleConnectionTimeout: 10000
# 命令等待超时,单位:毫秒 # 命令等待超时,单位:毫秒
timeout: 3000 timeout: 3000
# 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
retryAttempts: 3
# 命令重试发送时间间隔,单位:毫秒
retryInterval: 1500
# 发布和订阅连接池大小 # 发布和订阅连接池大小
subscriptionConnectionPoolSize: 50 subscriptionConnectionPoolSize: 50

View File

@ -75,10 +75,6 @@ spring:
restart: restart:
# 热部署开关 # 热部署开关
enabled: true enabled: true
# 与vue整合部署使用
thymeleaf:
# 将系统模板放置到最前面 否则会与 springboot-admin 页面冲突
template-resolver-order: 1
mvc: mvc:
pathmatch: pathmatch:
# 适配 boot 2.6 路由与 springfox 兼容 # 适配 boot 2.6 路由与 springfox 兼容
@ -107,16 +103,12 @@ sa-token:
is-concurrent: true is-concurrent: true
# 在多人登录同一账号时是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token) # 在多人登录同一账号时是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share: false is-share: false
# 是否尝试从请求体里读取token
is-read-body: false
# 是否尝试从header里读取token # 是否尝试从header里读取token
is-read-head: true is-read-head: true
# 是否尝试从cookie里读取token # 是否尝试从cookie里读取token
is-read-cookie: false is-read-cookie: false
# token前缀 # token前缀
token-prefix: "Bearer" token-prefix: "Bearer"
# token风格
token-style: uuid
# jwt秘钥 # jwt秘钥
jwt-secret-key: abcdefghijklmnopqrstuvwxyz jwt-secret-key: abcdefghijklmnopqrstuvwxyz
# 是否输出操作日志 # 是否输出操作日志
@ -282,8 +274,6 @@ lock4j:
management: management:
endpoints: endpoints:
web: web:
# Actuator 提供的 API 接口的根目录。默认为 /actuator
base-path: /actuator
exposure: exposure:
# 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
# 生产环境不建议放开所有 根据项目需求放开即可 # 生产环境不建议放开所有 根据项目需求放开即可

View File

@ -53,8 +53,7 @@ public class RedisConfig extends CachingConfigurerSupport {
Config config = new Config(); Config config = new Config();
config.setThreads(redissonProperties.getThreads()) config.setThreads(redissonProperties.getThreads())
.setNettyThreads(redissonProperties.getNettyThreads()) .setNettyThreads(redissonProperties.getNettyThreads())
.setCodec(JsonJacksonCodec.INSTANCE) .setCodec(JsonJacksonCodec.INSTANCE);
.setTransportMode(redissonProperties.getTransportMode());
RedissonProperties.SingleServerConfig singleServerConfig = redissonProperties.getSingleServerConfig(); RedissonProperties.SingleServerConfig singleServerConfig = redissonProperties.getSingleServerConfig();
if (ObjectUtil.isNotNull(singleServerConfig)) { if (ObjectUtil.isNotNull(singleServerConfig)) {
@ -65,8 +64,6 @@ public class RedisConfig extends CachingConfigurerSupport {
.setDatabase(redisProperties.getDatabase()) .setDatabase(redisProperties.getDatabase())
.setPassword(StringUtils.isNotBlank(redisProperties.getPassword()) ? redisProperties.getPassword() : null) .setPassword(StringUtils.isNotBlank(redisProperties.getPassword()) ? redisProperties.getPassword() : null)
.setTimeout(singleServerConfig.getTimeout()) .setTimeout(singleServerConfig.getTimeout())
.setRetryAttempts(singleServerConfig.getRetryAttempts())
.setRetryInterval(singleServerConfig.getRetryInterval())
.setClientName(singleServerConfig.getClientName()) .setClientName(singleServerConfig.getClientName())
.setIdleConnectionTimeout(singleServerConfig.getIdleConnectionTimeout()) .setIdleConnectionTimeout(singleServerConfig.getIdleConnectionTimeout())
.setSubscriptionConnectionPoolSize(singleServerConfig.getSubscriptionConnectionPoolSize()) .setSubscriptionConnectionPoolSize(singleServerConfig.getSubscriptionConnectionPoolSize())
@ -87,11 +84,8 @@ public class RedisConfig extends CachingConfigurerSupport {
.setConnectTimeout(((Long) redisProperties.getTimeout().toMillis()).intValue()) .setConnectTimeout(((Long) redisProperties.getTimeout().toMillis()).intValue())
.setPassword(StringUtils.isNotBlank(redisProperties.getPassword()) ? redisProperties.getPassword() : null) .setPassword(StringUtils.isNotBlank(redisProperties.getPassword()) ? redisProperties.getPassword() : null)
.setTimeout(clusterServersConfig.getTimeout()) .setTimeout(clusterServersConfig.getTimeout())
.setRetryAttempts(clusterServersConfig.getRetryAttempts())
.setRetryInterval(clusterServersConfig.getRetryInterval())
.setClientName(clusterServersConfig.getClientName()) .setClientName(clusterServersConfig.getClientName())
.setIdleConnectionTimeout(clusterServersConfig.getIdleConnectionTimeout()) .setIdleConnectionTimeout(clusterServersConfig.getIdleConnectionTimeout())
.setPingConnectionInterval(clusterServersConfig.getPingConnectionInterval())
.setSubscriptionConnectionPoolSize(clusterServersConfig.getSubscriptionConnectionPoolSize()) .setSubscriptionConnectionPoolSize(clusterServersConfig.getSubscriptionConnectionPoolSize())
.setMasterConnectionMinimumIdleSize(clusterServersConfig.getMasterConnectionMinimumIdleSize()) .setMasterConnectionMinimumIdleSize(clusterServersConfig.getMasterConnectionMinimumIdleSize())
.setMasterConnectionPoolSize(clusterServersConfig.getMasterConnectionPoolSize()) .setMasterConnectionPoolSize(clusterServersConfig.getMasterConnectionPoolSize())
@ -144,8 +138,6 @@ public class RedisConfig extends CachingConfigurerSupport {
* threads: 16 * threads: 16
* # Netty线程池数量 * # Netty线程池数量
* nettyThreads: 32 * nettyThreads: 32
* # 传输模式
* transportMode: "NIO"
* # 集群配置 * # 集群配置
* clusterServersConfig: * clusterServersConfig:
* # 客户端名称 * # 客户端名称
@ -160,14 +152,8 @@ public class RedisConfig extends CachingConfigurerSupport {
* slaveConnectionPoolSize: 64 * slaveConnectionPoolSize: 64
* # 连接空闲超时单位毫秒 * # 连接空闲超时单位毫秒
* idleConnectionTimeout: 10000 * idleConnectionTimeout: 10000
* # ping连接间隔
* pingConnectionInterval: 1000
* # 命令等待超时单位毫秒 * # 命令等待超时单位毫秒
* timeout: 3000 * timeout: 3000
* # 如果尝试在此限制之内发送成功则开始启用 timeout 计时
* retryAttempts: 3
* # 命令重试发送时间间隔单位毫秒
* retryInterval: 1500
* # 发布和订阅连接池大小 * # 发布和订阅连接池大小
* subscriptionConnectionPoolSize: 50 * subscriptionConnectionPoolSize: 50
* # 读取模式 * # 读取模式

View File

@ -4,7 +4,6 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.redisson.config.ReadMode; import org.redisson.config.ReadMode;
import org.redisson.config.SubscriptionMode; import org.redisson.config.SubscriptionMode;
import org.redisson.config.TransportMode;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -30,11 +29,6 @@ public class RedissonProperties {
*/ */
private int nettyThreads; private int nettyThreads;
/**
* 传输模式
*/
private TransportMode transportMode;
/** /**
* 单机服务配置 * 单机服务配置
*/ */
@ -79,16 +73,6 @@ public class RedissonProperties {
*/ */
private int timeout; private int timeout;
/**
* 如果尝试在此限制之内发送成功则开始启用 timeout 计时
*/
private int retryAttempts;
/**
* 命令重试发送时间间隔单位毫秒
*/
private int retryInterval;
/** /**
* 发布和订阅连接池大小 * 发布和订阅连接池大小
*/ */
@ -130,26 +114,11 @@ public class RedissonProperties {
*/ */
private int idleConnectionTimeout; private int idleConnectionTimeout;
/**
* ping超时
*/
private int pingConnectionInterval;
/** /**
* 命令等待超时单位毫秒 * 命令等待超时单位毫秒
*/ */
private int timeout; private int timeout;
/**
* 如果尝试在此限制之内发送成功则开始启用 timeout 计时
*/
private int retryAttempts;
/**
* 命令重试发送时间间隔单位毫秒
*/
private int retryInterval;
/** /**
* 发布和订阅连接池大小 * 发布和订阅连接池大小
*/ */