blob: cb2ad56e15e54817d8a360555ae9c3cbb83da6a5 [file] [log] [blame]
Jiarenxiang5f4247d2025-06-06 18:10:35 +08001# 项目相关配置
2ruoyi:
3 # 名称
4 name: TdHub
5 # 版本
6 version: 3.8.8
7 # 版权年份
8 copyrightYear: 2024
9 profile: ./download
10 # 获取ip地址开关
11 addressEnabled: false
12 # 验证码类型 math 数字计算 char 字符验证
13 captchaType: math
14
15# 开发环境配置
16server:
17 # 服务器的HTTP端口,默认为8080
18 address: 0.0.0.0
Jiarenxiangeb5dbca2025-06-06 19:03:33 +080019 port: 5004
Jiarenxiang5f4247d2025-06-06 18:10:35 +080020 servlet:
21 # 应用的访问路径
22 context-path: /
23 tomcat:
24 # tomcat的URI编码
25 uri-encoding: UTF-8
26 # 连接数满后的排队数,默认为100
27 accept-count: 1000
28 threads:
29 # tomcat最大线程数,默认为200
30 max: 800
31 # Tomcat启动初始化的线程数,默认值10
32 min-spare: 100
33 hostname: "192.168.146.1"
34
35# 日志配置
36logging:
37 level:
38 com.ruoyi: debug
39 org.springframework: warn
40
41# 用户配置
42user:
43 password:
44 # 密码最大错误次数
45 maxRetryCount: 5
46 # 密码锁定时间(默认10分钟)
47 lockTime: 10
48
49# Spring配置
50spring:
51 jpa:
52 show-sql: true
53 properties:
54 hibernate:
55 format_sql: true
56 flyway:
57 enabled: false # 禁用Flyway
58 # 资源信息
59 messages:
60 # 国际化资源文件路径
61 basename: i18n/messages
Jiarenxiang5f4247d2025-06-06 18:10:35 +080062 # 文件上传
63 servlet:
64 multipart:
65 # 单个文件大小
66 enabled: true
67 max-file-size: 100MB
68 # 设置总上传的文件大小
69 max-request-size: 1024MB
70 # 服务模块
71 devtools:
72 restart:
73 # 热部署开关
74 enabled: true
Jiarenxiangeb5dbca2025-06-06 19:03:33 +080075 datasource:
76 type: com.alibaba.druid.pool.DruidDataSource
77 driverClassName: com.mysql.cj.jdbc.Driver
78 master:
79 url: jdbc:mysql://202.205.102.121:3306/ThunderHub?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
80 username: team4
81 password: woaizhaoyutao
82 # 从库数据源
83 slave:
84 # 从数据源开关/默认关闭
85 enabled: true
86 url: jdbc:mysql://39.105.38.63:3306/pt?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
87 username: pt
88 password: JR8dHyiAJjtf6JAi
89 druid:
90 # 初始连接数
91 initialSize: 5
92 # 最小连接池数量
93 minIdle: 10
94 # 最大连接池数量
95 maxActive: 20
96 # 配置获取连接等待超时的时间
97 maxWait: 60000
98 # 配置连接超时时间
99 connectTimeout: 30000
100 # 配置网络超时时间
101 socketTimeout: 60000
102 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
103 timeBetweenEvictionRunsMillis: 60000
104 # 配置一个连接在池中最小生存的时间,单位是毫秒
105 minEvictableIdleTimeMillis: 300000
106 # 配置一个连接在池中最大生存的时间,单位是毫秒
107 maxEvictableIdleTimeMillis: 900000
108 # 配置检测连接是否有效
109 validationQuery: SELECT 1 FROM DUAL
110 testWhileIdle: true
111 testOnBorrow: false
112 testOnReturn: false
113 webStatFilter:
114 enabled: true
115 statViewServlet:
116 enabled: true
117 # 设置白名单,不填则允许所有访问
118 allow:
119 url-pattern: /druid/*
120 # 控制台管理用户名和密码
121 login-username: ruoyi
122 login-password: 123456
123 filter:
124 stat:
125 enabled: true
126 # 慢SQL记录
127 log-slow-sql: true
128 slow-sql-millis: 1000
129 merge-sql: true
130 wall:
131 config:
132 multi-statement-allow: true
Jiarenxiang5f4247d2025-06-06 18:10:35 +0800133 data:
134 # redis 配置
135 redis:
136 # 地址
137 host: redis
138 # 端口,默认为6379
139 port: 6379
140 # 数据库索引
141 database: 0
142 # 密码
143 password:
144 # 连接超时时间
145 timeout: 10s
146 lettuce:
147 pool:
148 # 连接池中的最小空闲连接
149 min-idle: 0
150 # 连接池中的最大空闲连接
151 max-idle: 8
152 # 连接池的最大数据库连接数
153 max-active: 8
154 # #连接池最大阻塞等待时间(使用负值表示没有限制)
155 max-wait: -1ms
156
157# token配置
158token:
159 # 令牌自定义标识
160 header: Authorization
161 # 令牌密钥
162 secret: abcdefghijklmnopqrstuvwxyz
163 # 令牌有效期(默认30分钟)
164 expireTime: 30
165
Jiarenxiang5f4247d2025-06-06 18:10:35 +0800166
167# MyBatis-plus配置
168mybatis-plus:
169 # 搜索指定包别名
170 typeAliasesPackage: com.ruoyi.**.domain
171 # 配置mapper的扫描,找到所有的mapper.xml映射文件
172 mapperLocations: classpath*:mapper/**/*Mapper.xml
173 configLocation: classpath:mybatis/mybatis-config.xml
174 # 全局配置
175 global-config:
176 # 主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
177 id-type: 0
178 # 字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
179 field-strategy: 2
180 # 驼峰下划线转换
181 db-column-underline: true
182 # 刷新mapper 调试神器
183 refresh-mapper: true
184 # 配置
185 configuration:
186 # 驼峰式命名
187 map-underscore-to-camel-case: true
188 # 全局映射器启用缓存
189 cache-enabled: true
190 # 指定 MyBatis 所用日志的具体实现
191 log-impl: org.slf4j;
192 # 配置默认的执行器
193 default-executor-type: reuse
194 # 允许 JDBC 支持自动生成主键
195 use-generated-keys: true
196
197
198# PageHelper分页插件
199pagehelper:
200 helperDialect: mysql
201 supportMethodsArguments: true
202 params: count=countSql
203
204# Springdoc配置
205springdoc:
206 api-docs:
207 path: /v3/api-docs
208 swagger-ui:
209 enabled: true
210 path: /swagger-ui.html
211 tags-sorter: alpha
212 group-configs:
213 - group: 'default'
214 display-name: '测试模块'
215 paths-to-match: '/**'
216 packages-to-scan: com.ruoyi.web.controller.tool
217
218# 防止XSS攻击
219xss:
220 # 过滤开关
221 enabled: true
222 # 排除链接(多个用逗号分隔)
223 excludes: /system/notice
224 # 匹配链接
225 urlPatterns: /system/*,/monitor/*,/tool/*
226
227# 设置是否调试,调试情况可跳过接口认证
228debug: false
229
230