blob: 2789eae89645ccd6d62ad0325dfa0c7563f119f4 [file] [log] [blame]
Jiarenxiang25a45b72025-03-13 16:09:13 +08001# 项目相关配置
2ruoyi:
3 # 名称
meisiyuc98fc522025-06-02 20:33:40 +08004 name: ThunderHub
Jiarenxiang25a45b72025-03-13 16:09:13 +08005 # 版本
meisiyuc98fc522025-06-02 20:33:40 +08006 version: 1.0.0
Jiarenxiang25a45b72025-03-13 16:09:13 +08007 # 版权年份
8 copyrightYear: 2024
meisiyuc98fc522025-06-02 20:33:40 +08009 # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
10 profile: ./upload
11 # 前端项目图片路径(相对于后端项目根目录)
12 frontendImagePath: ../ThunderHubWeb/public/images
Jiarenxiang25a45b72025-03-13 16:09:13 +080013 # 获取ip地址开关
14 addressEnabled: false
meisiyuc98fc522025-06-02 20:33:40 +080015 # 验证码类型 math 数组计算 char 字符验证
Jiarenxiang25a45b72025-03-13 16:09:13 +080016 captchaType: math
17
18# 开发环境配置
19server:
20 # 服务器的HTTP端口,默认为8080
21 port: 8080
22 servlet:
23 # 应用的访问路径
24 context-path: /
25 tomcat:
26 # tomcat的URI编码
27 uri-encoding: UTF-8
28 # 连接数满后的排队数,默认为100
29 accept-count: 1000
30 threads:
31 # tomcat最大线程数,默认为200
32 max: 800
33 # Tomcat启动初始化的线程数,默认值10
34 min-spare: 100
35
36# 日志配置
37logging:
38 level:
39 com.ruoyi: debug
40 org.springframework: warn
41
42# 用户配置
43user:
44 password:
45 # 密码最大错误次数
46 maxRetryCount: 5
47 # 密码锁定时间(默认10分钟)
48 lockTime: 10
49
50# Spring配置
51spring:
52 # 资源信息
53 messages:
54 # 国际化资源文件路径
55 basename: i18n/messages
56 profiles:
57 active: druid
Jiarenxiang25a45b72025-03-13 16:09:13 +080058 # 文件上传
59 servlet:
60 multipart:
崔向南03d21b92025-06-05 17:42:23 +080061 enabled: true
Jiarenxiang25a45b72025-03-13 16:09:13 +080062 max-file-size: 10MB
63 # 设置总上传的文件大小
64 max-request-size: 20MB
65 # 服务模块
66 devtools:
67 restart:
68 # 热部署开关
69 enabled: true
70 data:
71 # redis 配置
72 redis:
73 # 地址
74 host: localhost
75 # 端口,默认为6379
76 port: 6379
77 # 数据库索引
78 database: 0
79 # 密码
80 password:
81 # 连接超时时间
82 timeout: 10s
83 lettuce:
84 pool:
85 # 连接池中的最小空闲连接
86 min-idle: 0
87 # 连接池中的最大空闲连接
88 max-idle: 8
89 # 连接池的最大数据库连接数
90 max-active: 8
91 # #连接池最大阻塞等待时间(使用负值表示没有限制)
92 max-wait: -1ms
崔向南03d21b92025-06-05 17:42:23 +080093 mvc:
94 static-path-pattern: /**
95 resources:
96 static-locations: file:uploads/
Jiarenxiang25a45b72025-03-13 16:09:13 +080097
98# token配置
99token:
100 # 令牌自定义标识
101 header: Authorization
102 # 令牌密钥
103 secret: abcdefghijklmnopqrstuvwxyz
104 # 令牌有效期(默认30分钟)
105 expireTime: 30
106
107# MyBatis配置
108mybatis:
109 # 搜索指定包别名
110 typeAliasesPackage: com.ruoyi.**.domain
崔向南03d21b92025-06-05 17:42:23 +0800111 # 重点修改1:扩展XML扫描路径
Jiarenxiang25a45b72025-03-13 16:09:13 +0800112 mapperLocations: classpath*:mapper/**/*Mapper.xml
113 # 加载全局的配置文件
114 configLocation: classpath:mybatis/mybatis-config.xml
115
116# MyBatis-plus配置
117mybatis-plus:
118 # 搜索指定包别名
119 typeAliasesPackage: com.ruoyi.**.domain
崔向南03d21b92025-06-05 17:42:23 +0800120 # 重点修改2:覆盖原路径,支持多模块
121 mapper-locations: classpath*:mapper/**/*.xml
Jiarenxiang25a45b72025-03-13 16:09:13 +0800122 configLocation: classpath:mybatis/mybatis-config.xml
123 # 全局配置
124 global-config:
125 # 主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
126 id-type: 0
127 # 字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
128 field-strategy: 2
129 # 驼峰下划线转换
130 db-column-underline: true
131 # 刷新mapper 调试神器
132 refresh-mapper: true
崔向南03d21b92025-06-05 17:42:23 +0800133 # 重点修改3:明确开启驼峰映射
Jiarenxiang25a45b72025-03-13 16:09:13 +0800134 configuration:
135 # 驼峰式命名
136 map-underscore-to-camel-case: true
137 # 全局映射器启用缓存
138 cache-enabled: true
139 # 指定 MyBatis 所用日志的具体实现
140 log-impl: org.slf4j;
141 # 配置默认的执行器
142 default-executor-type: reuse
143 # 允许 JDBC 支持自动生成主键
144 use-generated-keys: true
145
崔向南03d21b92025-06-05 17:42:23 +0800146# 新增文件上传路径配置(放在末尾)
147file:
148 upload-dir: /var/www/uploads/
Jiarenxiang25a45b72025-03-13 16:09:13 +0800149
150# PageHelper分页插件
151pagehelper:
152 helperDialect: mysql
153 supportMethodsArguments: true
154 params: count=countSql
155
156# Springdoc配置
157springdoc:
158 api-docs:
159 path: /v3/api-docs
160 swagger-ui:
161 enabled: true
162 path: /swagger-ui.html
163 tags-sorter: alpha
164 group-configs:
165 - group: 'default'
166 display-name: '测试模块'
167 paths-to-match: '/**'
168 packages-to-scan: com.ruoyi.web.controller.tool
169
170# 防止XSS攻击
171xss:
172 # 过滤开关
173 enabled: true
174 # 排除链接(多个用逗号分隔)
175 excludes: /system/notice
176 # 匹配链接
177 urlPatterns: /system/*,/monitor/*,/tool/*
178
179# 设置是否调试,调试情况可跳过接口认证
180debug: false