mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-05-04 11:01:26 +08:00
update 更改 nacos 配置文件目录 从dev文件夹迁移到nacos文件夹与其他配置区分
This commit is contained in:
281
config/nacos/application-common.yml
Normal file
281
config/nacos/application-common.yml
Normal file
@@ -0,0 +1,281 @@
|
||||
server:
|
||||
# undertow 配置
|
||||
undertow:
|
||||
# HTTP post内容的最大大小。当值为-1时,默认值为大小是无限的
|
||||
max-http-post-size: -1
|
||||
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
|
||||
# 每块buffer的空间大小,越小的空间被利用越充分
|
||||
buffer-size: 512
|
||||
# 是否分配的直接内存
|
||||
direct-buffers: true
|
||||
threads:
|
||||
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
|
||||
io: 8
|
||||
# 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
|
||||
worker: 256
|
||||
|
||||
dubbo:
|
||||
application:
|
||||
logger: slf4j
|
||||
# 元数据中心 local 本地 remote 远程 这里使用远程便于其他服务获取
|
||||
metadataType: remote
|
||||
# 可选值 interface、instance、all,默认是 all,即接口级地址、应用级地址都注册
|
||||
register-mode: instance
|
||||
service-discovery:
|
||||
# FORCE_INTERFACE,只消费接口级地址,如无地址则报错,单订阅 2.x 地址
|
||||
# APPLICATION_FIRST,智能决策接口级/应用级地址,双订阅
|
||||
# FORCE_APPLICATION,只消费应用级地址,如无地址则报错,单订阅 3.x 地址
|
||||
migration: FORCE_APPLICATION
|
||||
qos-enable: false
|
||||
protocol:
|
||||
# 设置为 tri 即可使用 Triple 3.0 新协议
|
||||
# 性能对比 dubbo 协议并没有提升 但基于 http2 用于多语言异构等 http 交互场景
|
||||
# 使用 dubbo 协议通信
|
||||
name: dubbo
|
||||
# dubbo 协议端口(-1表示自增端口,从20880开始)
|
||||
port: -1
|
||||
# 指定dubbo协议注册ip
|
||||
# host: 192.168.0.100
|
||||
# 注册中心配置
|
||||
registry:
|
||||
address: nacos://${spring.cloud.nacos.server-addr}
|
||||
group: DUBBO_GROUP
|
||||
parameters:
|
||||
namespace: ${spring.profiles.active}
|
||||
# 消费者相关配置
|
||||
consumer:
|
||||
# 结果缓存(LRU算法)
|
||||
# 会有数据不一致问题 建议在注解局部开启
|
||||
cache: false
|
||||
# 支持校验注解
|
||||
validation: true
|
||||
# 超时时间
|
||||
timeout: 3000
|
||||
# 初始化检查
|
||||
check: false
|
||||
scan:
|
||||
# 接口实现类扫描
|
||||
base-packages: com.ruoyi.**.dubbo
|
||||
# 自定义配置
|
||||
custom:
|
||||
# 全局请求log
|
||||
request-log: true
|
||||
# info 基础信息 param 参数信息 full 全部
|
||||
log-level: info
|
||||
|
||||
spring:
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
servlet:
|
||||
multipart:
|
||||
# 整个请求大小限制
|
||||
max-request-size: 20MB
|
||||
# 上传单个文件大小限制
|
||||
max-file-size: 10MB
|
||||
#jackson配置
|
||||
jackson:
|
||||
# 日期格式化
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
serialization:
|
||||
# 格式化输出
|
||||
INDENT_OUTPUT: false
|
||||
# 忽略无法转换的对象
|
||||
fail_on_empty_beans: false
|
||||
deserialization:
|
||||
# 允许对象忽略json中不存在的属性
|
||||
fail_on_unknown_properties: false
|
||||
cloud:
|
||||
# sentinel 配置
|
||||
sentinel:
|
||||
# sentinel 开关
|
||||
enabled: true
|
||||
# 取消控制台懒加载
|
||||
eager: true
|
||||
transport:
|
||||
# dashboard控制台服务名 用于服务发现
|
||||
# 如无此配置将默认使用下方 dashboard 配置直接注册
|
||||
server-name: ruoyi-sentinel-dashboard
|
||||
# 客户端指定注册的ip 用于多网卡ip不稳点使用
|
||||
# client-ip:
|
||||
# 控制台地址 从1.3.0开始使用 server-name 注册
|
||||
# dashboard: localhost:8718
|
||||
|
||||
# redis通用配置 子服务可以自行配置进行覆盖
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
# 密码(如没有密码请注释掉)
|
||||
# password:
|
||||
database: 0
|
||||
timeout: 10s
|
||||
ssl: false
|
||||
|
||||
# redisson 配置
|
||||
redisson:
|
||||
# redis key前缀
|
||||
keyPrefix:
|
||||
# 线程池数量
|
||||
threads: 4
|
||||
# Netty线程池数量
|
||||
nettyThreads: 8
|
||||
# 单节点配置
|
||||
singleServerConfig:
|
||||
# 客户端名称
|
||||
clientName: ${spring.application.name}
|
||||
# 最小空闲连接数
|
||||
connectionMinimumIdleSize: 8
|
||||
# 连接池大小
|
||||
connectionPoolSize: 32
|
||||
# 连接空闲超时,单位:毫秒
|
||||
idleConnectionTimeout: 10000
|
||||
# 命令等待超时,单位:毫秒
|
||||
timeout: 3000
|
||||
# 发布和订阅连接池大小
|
||||
subscriptionConnectionPoolSize: 50
|
||||
|
||||
# 分布式锁 lock4j 全局配置
|
||||
lock4j:
|
||||
# 获取分布式锁超时时间,默认为 3000 毫秒
|
||||
acquire-timeout: 3000
|
||||
# 分布式锁的超时时间,默认为 30 秒
|
||||
expire: 30000
|
||||
|
||||
# 暴露监控端点
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: ALWAYS
|
||||
logfile:
|
||||
external-file: ./logs/${spring.application.name}/console.log
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
org.springframework: warn
|
||||
org.apache.dubbo: warn
|
||||
com.alibaba.nacos: warn
|
||||
config: classpath:logback.xml
|
||||
|
||||
# Sa-Token配置
|
||||
sa-token:
|
||||
# token名称 (同时也是cookie名称)
|
||||
token-name: Authorization
|
||||
# token有效期 设为一天 (必定过期) 单位: 秒
|
||||
timeout: 86400
|
||||
# token临时有效期 (指定时间无操作就过期) 单位: 秒
|
||||
activity-timeout: 1800
|
||||
# 开启内网服务调用鉴权
|
||||
check-same-token: true
|
||||
# Same-Token的有效期 (单位: 秒)
|
||||
same-token-timeout: 600
|
||||
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
||||
is-concurrent: true
|
||||
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
||||
is-share: false
|
||||
# 是否尝试从header里读取token
|
||||
is-read-header: true
|
||||
# 是否尝试从cookie里读取token
|
||||
is-read-cookie: false
|
||||
# token前缀
|
||||
token-prefix: "Bearer"
|
||||
# jwt秘钥
|
||||
jwt-secret-key: abcdefghijklmnopqrstuvwxyz
|
||||
# 是否输出操作日志
|
||||
is-log: true
|
||||
|
||||
# MyBatisPlus配置
|
||||
# https://baomidou.com/config/
|
||||
mybatis-plus:
|
||||
# 不支持多包, 如有需要可在注解配置 或 提升扫包等级
|
||||
# 例如 com.**.**.mapper
|
||||
mapperPackage: com.ruoyi.**.mapper
|
||||
# 对应的 XML 文件位置
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 实体扫描,多个package用逗号或者分号分隔
|
||||
typeAliasesPackage: com.ruoyi.**.domain
|
||||
# 启动时是否检查 MyBatis XML 文件的存在,默认不检查
|
||||
checkConfigLocation: false
|
||||
configuration:
|
||||
# 自动驼峰命名规则(camel case)映射
|
||||
mapUnderscoreToCamelCase: true
|
||||
# MyBatis 自动映射策略
|
||||
# NONE:不启用 PARTIAL:只对非嵌套 resultMap 自动映射 FULL:对所有 resultMap 自动映射
|
||||
autoMappingBehavior: PARTIAL
|
||||
# MyBatis 自动映射时未知列或未知属性处理策
|
||||
# NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息
|
||||
autoMappingUnknownColumnBehavior: NONE
|
||||
# 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
# 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl
|
||||
logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
global-config:
|
||||
# 是否打印 Logo banner
|
||||
banner: true
|
||||
dbConfig:
|
||||
# 主键类型
|
||||
# AUTO 自增 NONE 空 INPUT 用户输入 ASSIGN_ID 雪花 ASSIGN_UUID 唯一 UUID
|
||||
idType: ASSIGN_ID
|
||||
# 逻辑已删除值
|
||||
logicDeleteValue: 2
|
||||
# 逻辑未删除值
|
||||
logicNotDeleteValue: 0
|
||||
insertStrategy: NOT_NULL
|
||||
updateStrategy: NOT_NULL
|
||||
where-strategy: NOT_NULL
|
||||
|
||||
# swagger配置
|
||||
swagger:
|
||||
# 是否开启swagger
|
||||
enabled: true
|
||||
info:
|
||||
# 标题
|
||||
title: '标题:RuoYi-Cloud-Plus微服务权限管理系统_接口文档'
|
||||
# 描述
|
||||
description: '描述:微服务权限管理系统, 具体包括XXX,XXX模块...'
|
||||
# 版本
|
||||
version: '版本号:系统版本...'
|
||||
# 作者信息
|
||||
contact:
|
||||
name: Lion Li
|
||||
email: crazylionli@163.com
|
||||
url: https://gitee.com/JavaLionLi/RuoYi-Cloud-Plus
|
||||
components:
|
||||
# 鉴权方式配置
|
||||
security-schemes:
|
||||
apiKey:
|
||||
type: APIKEY
|
||||
in: HEADER
|
||||
name: ${sa-token.token-name}
|
||||
# 服务文档路径映射 参考 gateway router 配置
|
||||
# 默认为服务名去除前缀转换为path 此处填特殊的配置
|
||||
service-mapping:
|
||||
ruoyi-gen: /code
|
||||
|
||||
# seata配置
|
||||
seata:
|
||||
# 默认关闭,如需启用spring.datasource.dynami.seata需要同时开启
|
||||
enabled: true
|
||||
# Seata 应用编号,默认为 ${spring.application.name}
|
||||
application-id: ${spring.application.name}
|
||||
# Seata 事务组编号,用于 TC 集群名
|
||||
tx-service-group: ${spring.application.name}-group
|
||||
config:
|
||||
type: nacos
|
||||
nacos:
|
||||
server-addr: ${spring.cloud.nacos.server-addr}
|
||||
group: ${spring.cloud.nacos.config.group}
|
||||
namespace: ${spring.profiles.active}
|
||||
data-id: seata-server.properties
|
||||
registry:
|
||||
type: nacos
|
||||
nacos:
|
||||
application: ruoyi-seata-server
|
||||
server-addr: ${spring.cloud.nacos.server-addr}
|
||||
group: ${spring.cloud.nacos.discovery.group}
|
||||
namespace: ${spring.profiles.active}
|
||||
47
config/nacos/datasource.yml
Normal file
47
config/nacos/datasource.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
datasource:
|
||||
system-master:
|
||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能
|
||||
url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: password
|
||||
gen:
|
||||
url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: password
|
||||
job:
|
||||
url: jdbc:mysql://localhost:3306/ry-job?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
|
||||
username: root
|
||||
password: password
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
# 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
|
||||
dynamic:
|
||||
# 性能分析插件(有性能损耗 不建议生产环境使用)
|
||||
p6spy: true
|
||||
# 开启seata代理,开启后默认每个数据源都代理,如果某个不需要代理可单独关闭
|
||||
seata: true
|
||||
# 严格模式 匹配不到数据源则报错
|
||||
strict: true
|
||||
hikari:
|
||||
# 最大连接池数量
|
||||
maxPoolSize: 20
|
||||
# 最小空闲线程数量
|
||||
minIdle: 10
|
||||
# 配置获取连接等待超时的时间
|
||||
connectionTimeout: 10000
|
||||
# 校验超时时间
|
||||
validationTimeout: 5000
|
||||
# 空闲连接存活最大时间,默认10分钟
|
||||
idleTimeout: 60000
|
||||
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
||||
maxLifetime: 900000
|
||||
# 连接测试query(配置检测连接是否有效)
|
||||
connectionTestQuery: SELECT 1
|
||||
|
||||
# seata配置
|
||||
seata:
|
||||
# 关闭自动代理
|
||||
enable-auto-data-source-proxy: false
|
||||
7
config/nacos/ruoyi-auth.yml
Normal file
7
config/nacos/ruoyi-auth.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
# 用户配置
|
||||
user:
|
||||
password:
|
||||
# 密码最大错误次数
|
||||
maxRetryCount: 5
|
||||
# 密码锁定时间(默认10分钟)
|
||||
lockTime: 10
|
||||
100
config/nacos/ruoyi-gateway.yml
Normal file
100
config/nacos/ruoyi-gateway.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
# 安全配置
|
||||
security:
|
||||
# 验证码
|
||||
captcha:
|
||||
# 是否开启验证码
|
||||
enabled: true
|
||||
# 验证码类型 math 数组计算 char 字符验证
|
||||
type: MATH
|
||||
# line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
|
||||
category: CIRCLE
|
||||
# 数字验证码位数
|
||||
numberLength: 1
|
||||
# 字符验证码长度
|
||||
charLength: 4
|
||||
# 防止XSS攻击
|
||||
xss:
|
||||
enabled: true
|
||||
excludeUrls:
|
||||
- /system/notice
|
||||
# 不校验白名单
|
||||
ignore:
|
||||
whites:
|
||||
- /code
|
||||
- /auth/logout
|
||||
- /auth/login
|
||||
- /auth/smsLogin
|
||||
- /auth/xcxLogin
|
||||
- /auth/register
|
||||
- /resource/sms/code
|
||||
- /*/v3/api-docs
|
||||
- /csrf
|
||||
|
||||
spring:
|
||||
cloud:
|
||||
# 网关配置
|
||||
gateway:
|
||||
# 打印请求日志(自定义)
|
||||
requestLog: true
|
||||
discovery:
|
||||
locator:
|
||||
lowerCaseServiceId: true
|
||||
enabled: true
|
||||
routes:
|
||||
# 认证中心
|
||||
- id: ruoyi-auth
|
||||
uri: lb://ruoyi-auth
|
||||
predicates:
|
||||
- Path=/auth/**
|
||||
filters:
|
||||
# 验证码处理
|
||||
- ValidateCodeFilter
|
||||
- StripPrefix=1
|
||||
# 代码生成
|
||||
- id: ruoyi-gen
|
||||
uri: lb://ruoyi-gen
|
||||
predicates:
|
||||
- Path=/code/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
# 系统模块
|
||||
- id: ruoyi-system
|
||||
uri: lb://ruoyi-system
|
||||
predicates:
|
||||
- Path=/system/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
# 资源服务
|
||||
- id: ruoyi-resource
|
||||
uri: lb://ruoyi-resource
|
||||
predicates:
|
||||
- Path=/resource/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
# 演示服务
|
||||
- id: ruoyi-demo
|
||||
uri: lb://ruoyi-demo
|
||||
predicates:
|
||||
- Path=/demo/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
# MQ演示服务
|
||||
- id: ruoyi-stream-mq
|
||||
uri: lb://ruoyi-stream-mq
|
||||
predicates:
|
||||
- Path=/stream-mq/**
|
||||
filters:
|
||||
- StripPrefix=1
|
||||
|
||||
# sentinel 配置
|
||||
sentinel:
|
||||
# nacos配置持久化
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: ${spring.cloud.nacos.server-addr}
|
||||
dataId: sentinel-${spring.application.name}.json
|
||||
groupId: ${spring.cloud.nacos.config.group}
|
||||
namespace: ${spring.profiles.active}
|
||||
data-type: json
|
||||
rule-type: flow
|
||||
32
config/nacos/ruoyi-gen.yml
Normal file
32
config/nacos/ruoyi-gen.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${datasource.system-master.url}
|
||||
username: ${datasource.system-master.username}
|
||||
password: ${datasource.system-master.password}
|
||||
# 从库数据源
|
||||
#slave:
|
||||
# lazy: true
|
||||
# type: ${spring.datasource.type}
|
||||
# driver-class-name:
|
||||
# url:
|
||||
# username:
|
||||
# password:
|
||||
|
||||
# 代码生成
|
||||
gen:
|
||||
# 作者
|
||||
author: ruoyi
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.ruoyi.system
|
||||
# 自动去除表前缀,默认是false
|
||||
autoRemovePre: false
|
||||
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
|
||||
tablePrefix: sys_
|
||||
38
config/nacos/ruoyi-job.yml
Normal file
38
config/nacos/ruoyi-job.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${datasource.job.url}
|
||||
username: ${datasource.job.username}
|
||||
password: ${datasource.job.password}
|
||||
|
||||
xxl:
|
||||
job:
|
||||
# 执行器开关
|
||||
enabled: true
|
||||
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
||||
# admin-addresses: http://localhost:9900
|
||||
# 调度中心应用名 通过服务名连接调度中心(启用admin-appname会导致admin-addresses不生效)
|
||||
admin-appname: ruoyi-xxl-job-admin
|
||||
# 执行器通讯TOKEN:非空时启用
|
||||
access-token: xxl-job
|
||||
# 执行器配置
|
||||
executor:
|
||||
# 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
|
||||
appname: ${spring.application.name}-executor
|
||||
# 执行器端口号 执行器从19901开始往后写
|
||||
port: 9901
|
||||
# 执行器注册:默认IP:PORT
|
||||
address:
|
||||
# 执行器IP:默认自动获取IP
|
||||
ip:
|
||||
# 执行器运行日志文件存储磁盘路径
|
||||
logpath: ./logs/${spring.application.name}/xxl-job
|
||||
# 执行器日志文件保存天数:大于3生效
|
||||
logretentiondays: 30
|
||||
13
config/nacos/ruoyi-monitor.yml
Normal file
13
config/nacos/ruoyi-monitor.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
# 监控中心配置
|
||||
spring:
|
||||
security:
|
||||
user:
|
||||
name: ruoyi
|
||||
password: 123456
|
||||
boot:
|
||||
admin:
|
||||
ui:
|
||||
title: RuoYi-Cloud-Plus服务监控中心
|
||||
discovery:
|
||||
# seata 不具有健康检查的能力 防止报错排除掉
|
||||
ignored-services: ruoyi-seata-server
|
||||
45
config/nacos/ruoyi-resource.yml
Normal file
45
config/nacos/ruoyi-resource.yml
Normal file
@@ -0,0 +1,45 @@
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${datasource.system-master.url}
|
||||
username: ${datasource.system-master.username}
|
||||
password: ${datasource.system-master.password}
|
||||
|
||||
mail:
|
||||
enabled: false
|
||||
host: smtp.163.com
|
||||
port: 465
|
||||
# 是否需要用户名密码验证
|
||||
auth: true
|
||||
# 发送方,遵循RFC-822标准
|
||||
from: xxx@163.com
|
||||
# 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
|
||||
user: xxx@163.com
|
||||
# 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
|
||||
pass: xxxxxxxxxx
|
||||
# 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
|
||||
starttlsEnable: true
|
||||
# 使用SSL安全连接
|
||||
sslEnable: true
|
||||
# SMTP超时时长,单位毫秒,缺省值不超时
|
||||
timeout: 0
|
||||
# Socket连接超时值,单位毫秒,缺省值不超时
|
||||
connectionTimeout: 0
|
||||
|
||||
sms:
|
||||
enabled: false
|
||||
# 阿里云 dysmsapi.aliyuncs.com
|
||||
# 腾讯云 sms.tencentcloudapi.com
|
||||
endpoint: "dysmsapi.aliyuncs.com"
|
||||
accessKeyId: xxxxxxx
|
||||
accessKeySecret: xxxxxx
|
||||
signName: 测试
|
||||
# 腾讯专用
|
||||
sdkAppId:
|
||||
27
config/nacos/ruoyi-sentinel-dashboard.yml
Normal file
27
config/nacos/ruoyi-sentinel-dashboard.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
spring:
|
||||
mvc:
|
||||
pathmatch:
|
||||
# 修复 sentinel 控制台未适配 springboot 2.6 新路由方式
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
|
||||
server:
|
||||
servlet:
|
||||
encoding:
|
||||
force: true
|
||||
charset: UTF-8
|
||||
enabled: true
|
||||
session:
|
||||
cookie:
|
||||
name: sentinel_dashboard_cookie
|
||||
|
||||
logging:
|
||||
level:
|
||||
org.springframework.web: INFO
|
||||
|
||||
auth:
|
||||
enabled: true
|
||||
filter:
|
||||
exclude-urls: /,/auth/login,/auth/logout,/registry/machine,/version,/actuator,/actuator/**
|
||||
exclude-url-suffixes: htm,html,js,css,map,ico,ttf,woff,png
|
||||
username: sentinel
|
||||
password: sentinel
|
||||
20
config/nacos/ruoyi-system.yml
Normal file
20
config/nacos/ruoyi-system.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
spring:
|
||||
datasource:
|
||||
dynamic:
|
||||
# 设置默认的数据源或者数据源组,默认值即为 master
|
||||
primary: master
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
type: ${spring.datasource.type}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${datasource.system-master.url}
|
||||
username: ${datasource.system-master.username}
|
||||
password: ${datasource.system-master.password}
|
||||
# 从库数据源
|
||||
# slave:
|
||||
# type: ${spring.datasource.type}
|
||||
# driver-class-name:
|
||||
# url:
|
||||
# username:
|
||||
# password:
|
||||
67
config/nacos/ruoyi-xxl-job-admin.yml
Normal file
67
config/nacos/ruoyi-xxl-job-admin.yml
Normal file
@@ -0,0 +1,67 @@
|
||||
# server 配置
|
||||
spring:
|
||||
datasource:
|
||||
type: com.zaxxer.hikari.HikariDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: ${datasource.job.url}
|
||||
username: ${datasource.job.username}
|
||||
password: ${datasource.job.password}
|
||||
hikari:
|
||||
auto-commit: true
|
||||
connection-test-query: SELECT 1
|
||||
connection-timeout: 10000
|
||||
idle-timeout: 30000
|
||||
max-lifetime: 900000
|
||||
maximum-pool-size: 30
|
||||
minimum-idle: 10
|
||||
pool-name: HikariCP
|
||||
validation-timeout: 1000
|
||||
mail:
|
||||
from: xxx@qq.com
|
||||
host: smtp.qq.com
|
||||
username: xxx@qq.com
|
||||
password: xxx
|
||||
port: 25
|
||||
properties:
|
||||
mail:
|
||||
smtp:
|
||||
auth: true
|
||||
socketFactory:
|
||||
class: javax.net.ssl.SSLSocketFactory
|
||||
starttls:
|
||||
enable: true
|
||||
required: true
|
||||
|
||||
# mybatis 配置
|
||||
mybatis:
|
||||
mapper-locations: classpath:/mybatis-mapper/*Mapper.xml
|
||||
|
||||
# Actuator 监控端点的配置项
|
||||
management:
|
||||
health:
|
||||
mail:
|
||||
enabled: false
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: ALWAYS
|
||||
logfile:
|
||||
external-file: ./logs/${spring.application.name}/console.log
|
||||
|
||||
# xxljob系统配置
|
||||
xxl:
|
||||
job:
|
||||
# 鉴权token
|
||||
accessToken: xxl-job
|
||||
# 国际化
|
||||
i18n: zh_CN
|
||||
# 日志清理
|
||||
logretentiondays: 30
|
||||
triggerpool:
|
||||
fast:
|
||||
max: 200
|
||||
slow:
|
||||
max: 100
|
||||
122
config/nacos/seata-server.properties
Normal file
122
config/nacos/seata-server.properties
Normal file
@@ -0,0 +1,122 @@
|
||||
service.vgroupMapping.ruoyi-auth-group=default
|
||||
service.vgroupMapping.ruoyi-system-group=default
|
||||
service.vgroupMapping.ruoyi-resource-group=default
|
||||
service.vgroupMapping.ruoyi-gen-group=default
|
||||
service.vgroupMapping.ruoyi-job-group=default
|
||||
|
||||
service.enableDegrade=false
|
||||
service.disableGlobalTransaction=false
|
||||
|
||||
#Transaction storage configuration, only for the server. The file, DB, and redis configuration values are optional.
|
||||
store.mode=db
|
||||
store.lock.mode=db
|
||||
store.session.mode=db
|
||||
#Used for password encryption
|
||||
store.publicKey=
|
||||
|
||||
#These configurations are required if the `store mode` is `db`. If `store.mode,store.lock.mode,store.session.mode` are not equal to `db`, you can remove the configuration block.
|
||||
store.db.datasource=hikari
|
||||
store.db.dbType=mysql
|
||||
store.db.driverClassName=com.mysql.cj.jdbc.Driver
|
||||
store.db.url=jdbc:mysql://127.0.0.1:3306/ry-seata?useUnicode=true&rewriteBatchedStatements=true
|
||||
store.db.user=root
|
||||
store.db.password=root
|
||||
store.db.minConn=5
|
||||
store.db.maxConn=30
|
||||
store.db.globalTable=global_table
|
||||
store.db.branchTable=branch_table
|
||||
store.db.distributedLockTable=distributed_lock
|
||||
store.db.queryLimit=100
|
||||
store.db.lockTable=lock_table
|
||||
store.db.maxWait=5000
|
||||
|
||||
# redis 模式 store.mode=redis 开启 (控制台查询功能有限,不影响实际执行功能)
|
||||
# store.redis.host=127.0.0.1
|
||||
# store.redis.port=6379
|
||||
# 最大连接数
|
||||
# store.redis.maxConn=10
|
||||
# 最小连接数
|
||||
# store.redis.minConn=1
|
||||
# store.redis.database=0
|
||||
# store.redis.password=
|
||||
# store.redis.queryLimit=100
|
||||
|
||||
#Transaction rule configuration, only for the server
|
||||
server.recovery.committingRetryPeriod=1000
|
||||
server.recovery.asynCommittingRetryPeriod=1000
|
||||
server.recovery.rollbackingRetryPeriod=1000
|
||||
server.recovery.timeoutRetryPeriod=1000
|
||||
server.maxCommitRetryTimeout=-1
|
||||
server.maxRollbackRetryTimeout=-1
|
||||
server.rollbackRetryTimeoutUnlockEnable=false
|
||||
server.distributedLockExpireTime=10000
|
||||
server.xaerNotaRetryTimeout=60000
|
||||
server.session.branchAsyncQueueSize=5000
|
||||
server.session.enableBranchAsyncRemove=false
|
||||
|
||||
#Transaction rule configuration, only for the client
|
||||
client.rm.asyncCommitBufferLimit=10000
|
||||
client.rm.lock.retryInterval=10
|
||||
client.rm.lock.retryTimes=30
|
||||
client.rm.lock.retryPolicyBranchRollbackOnConflict=true
|
||||
client.rm.reportRetryCount=5
|
||||
client.rm.tableMetaCheckEnable=true
|
||||
client.rm.tableMetaCheckerInterval=60000
|
||||
client.rm.sqlParserType=druid
|
||||
client.rm.reportSuccessEnable=false
|
||||
client.rm.sagaBranchRegisterEnable=false
|
||||
client.rm.sagaJsonParser=fastjson
|
||||
client.rm.tccActionInterceptorOrder=-2147482648
|
||||
client.tm.commitRetryCount=5
|
||||
client.tm.rollbackRetryCount=5
|
||||
client.tm.defaultGlobalTransactionTimeout=60000
|
||||
client.tm.degradeCheck=false
|
||||
client.tm.degradeCheckAllowTimes=10
|
||||
client.tm.degradeCheckPeriod=2000
|
||||
client.tm.interceptorOrder=-2147482648
|
||||
client.undo.dataValidation=true
|
||||
client.undo.logSerialization=jackson
|
||||
client.undo.onlyCareUpdateColumns=true
|
||||
server.undo.logSaveDays=7
|
||||
server.undo.logDeletePeriod=86400000
|
||||
client.undo.logTable=undo_log
|
||||
client.undo.compress.enable=true
|
||||
client.undo.compress.type=zip
|
||||
client.undo.compress.threshold=64k
|
||||
|
||||
#For TCC transaction mode
|
||||
tcc.fence.logTableName=tcc_fence_log
|
||||
tcc.fence.cleanPeriod=1h
|
||||
|
||||
#Log rule configuration, for client and server
|
||||
log.exceptionRate=100
|
||||
|
||||
#Metrics configuration, only for the server
|
||||
metrics.enabled=false
|
||||
metrics.registryType=compact
|
||||
metrics.exporterList=prometheus
|
||||
metrics.exporterPrometheusPort=9898
|
||||
|
||||
#For details about configuration items, see https://seata.io/zh-cn/docs/user/configurations.html
|
||||
#Transport configuration, for client and server
|
||||
transport.type=TCP
|
||||
transport.server=NIO
|
||||
transport.heartbeat=true
|
||||
transport.enableTmClientBatchSendRequest=false
|
||||
transport.enableRmClientBatchSendRequest=true
|
||||
transport.enableTcServerBatchSendResponse=false
|
||||
transport.rpcRmRequestTimeout=30000
|
||||
transport.rpcTmRequestTimeout=30000
|
||||
transport.rpcTcRequestTimeout=30000
|
||||
transport.threadFactory.bossThreadPrefix=NettyBoss
|
||||
transport.threadFactory.workerThreadPrefix=NettyServerNIOWorker
|
||||
transport.threadFactory.serverExecutorThreadPrefix=NettyServerBizHandler
|
||||
transport.threadFactory.shareBossWorker=false
|
||||
transport.threadFactory.clientSelectorThreadPrefix=NettyClientSelector
|
||||
transport.threadFactory.clientSelectorThreadSize=1
|
||||
transport.threadFactory.clientWorkerThreadPrefix=NettyClientWorkerThread
|
||||
transport.threadFactory.bossThreadSize=1
|
||||
transport.threadFactory.workerThreadSize=default
|
||||
transport.shutdown.wait=3
|
||||
transport.serialization=seata
|
||||
transport.compressor=none
|
||||
26
config/nacos/sentinel-ruoyi-gateway.json
Normal file
26
config/nacos/sentinel-ruoyi-gateway.json
Normal file
@@ -0,0 +1,26 @@
|
||||
[
|
||||
{
|
||||
"resource": "ruoyi-auth",
|
||||
"count": 500,
|
||||
"grade": 1,
|
||||
"limitApp": "default",
|
||||
"strategy": 0,
|
||||
"controlBehavior": 0
|
||||
},
|
||||
{
|
||||
"resource": "ruoyi-system",
|
||||
"count": 1000,
|
||||
"grade": 1,
|
||||
"limitApp": "default",
|
||||
"strategy": 0,
|
||||
"controlBehavior": 0
|
||||
},
|
||||
{
|
||||
"resource": "ruoyi-resource",
|
||||
"count": 500,
|
||||
"grade": 1,
|
||||
"limitApp": "default",
|
||||
"strategy": 0,
|
||||
"controlBehavior": 0
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user