blob: ed5debefb0aef0f19c244684dec7ed84c411b05e [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
liangjiabao5a1a7632025-06-05 18:49:18 +080021 port: 5004
Jiarenxiang25a45b72025-03-13 16:09:13 +080022 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
Jiarenxiang5f4247d2025-06-06 18:10:35 +080035 hostname: "192.168.146.1"
Jiarenxiang25a45b72025-03-13 16:09:13 +080036
37# 日志配置
38logging:
39 level:
40 com.ruoyi: debug
41 org.springframework: warn
42
43# 用户配置
44user:
45 password:
46 # 密码最大错误次数
47 maxRetryCount: 5
48 # 密码锁定时间(默认10分钟)
49 lockTime: 10
50
51# Spring配置
52spring:
Jiarenxiang5f4247d2025-06-06 18:10:35 +080053 jpa:
54 show-sql: true
55 properties:
56 hibernate:
57 format_sql: true
58 flyway:
59 enabled: false # 禁用Flyway
Jiarenxiang25a45b72025-03-13 16:09:13 +080060 # 资源信息
61 messages:
62 # 国际化资源文件路径
63 basename: i18n/messages
64 profiles:
65 active: druid
Jiarenxiang25a45b72025-03-13 16:09:13 +080066 # 文件上传
67 servlet:
68 multipart:
Jiarenxiang5f4247d2025-06-06 18:10:35 +080069
70 # 单个文件大小
崔向南03d21b92025-06-05 17:42:23 +080071 enabled: true
Jiarenxiang5f4247d2025-06-06 18:10:35 +080072 max-file-size: 100MB
73
Jiarenxiang25a45b72025-03-13 16:09:13 +080074 # 设置总上传的文件大小
Jiarenxiang5f4247d2025-06-06 18:10:35 +080075 max-request-size: 1024MB
Jiarenxiang25a45b72025-03-13 16:09:13 +080076 # 服务模块
77 devtools:
78 restart:
79 # 热部署开关
80 enabled: true
81 data:
82 # redis 配置
83 redis:
84 # 地址
Jiarenxiang5f4247d2025-06-06 18:10:35 +080085 host: 127.0.0.1
Jiarenxiang25a45b72025-03-13 16:09:13 +080086 # 端口,默认为6379
87 port: 6379
88 # 数据库索引
89 database: 0
90 # 密码
91 password:
92 # 连接超时时间
93 timeout: 10s
94 lettuce:
95 pool:
96 # 连接池中的最小空闲连接
97 min-idle: 0
98 # 连接池中的最大空闲连接
99 max-idle: 8
100 # 连接池的最大数据库连接数
101 max-active: 8
102 # #连接池最大阻塞等待时间(使用负值表示没有限制)
103 max-wait: -1ms
崔向南03d21b92025-06-05 17:42:23 +0800104 mvc:
105 static-path-pattern: /**
106 resources:
107 static-locations: file:uploads/
Jiarenxiang25a45b72025-03-13 16:09:13 +0800108
109# token配置
110token:
111 # 令牌自定义标识
112 header: Authorization
113 # 令牌密钥
114 secret: abcdefghijklmnopqrstuvwxyz
115 # 令牌有效期(默认30分钟)
116 expireTime: 30
117
Jiarenxiang25a45b72025-03-13 16:09:13 +0800118
119# MyBatis-plus配置
120mybatis-plus:
121 # 搜索指定包别名
122 typeAliasesPackage: com.ruoyi.**.domain
Jiarenxiang5f4247d2025-06-06 18:10:35 +0800123
崔向南03d21b92025-06-05 17:42:23 +0800124 # 重点修改2:覆盖原路径,支持多模块
125 mapper-locations: classpath*:mapper/**/*.xml
Jiarenxiang25a45b72025-03-13 16:09:13 +0800126 configLocation: classpath:mybatis/mybatis-config.xml
127 # 全局配置
128 global-config:
129 # 主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
130 id-type: 0
131 # 字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
132 field-strategy: 2
133 # 驼峰下划线转换
134 db-column-underline: true
135 # 刷新mapper 调试神器
136 refresh-mapper: true
崔向南03d21b92025-06-05 17:42:23 +0800137 # 重点修改3:明确开启驼峰映射
Jiarenxiang25a45b72025-03-13 16:09:13 +0800138 configuration:
139 # 驼峰式命名
140 map-underscore-to-camel-case: true
141 # 全局映射器启用缓存
142 cache-enabled: true
143 # 指定 MyBatis 所用日志的具体实现
144 log-impl: org.slf4j;
145 # 配置默认的执行器
146 default-executor-type: reuse
147 # 允许 JDBC 支持自动生成主键
148 use-generated-keys: true
149
崔向南03d21b92025-06-05 17:42:23 +0800150# 新增文件上传路径配置(放在末尾)
151file:
152 upload-dir: /var/www/uploads/
Jiarenxiang25a45b72025-03-13 16:09:13 +0800153
154# PageHelper分页插件
155pagehelper:
156 helperDialect: mysql
157 supportMethodsArguments: true
158 params: count=countSql
159
160# Springdoc配置
161springdoc:
162 api-docs:
163 path: /v3/api-docs
164 swagger-ui:
165 enabled: true
166 path: /swagger-ui.html
167 tags-sorter: alpha
168 group-configs:
169 - group: 'default'
170 display-name: '测试模块'
171 paths-to-match: '/**'
172 packages-to-scan: com.ruoyi.web.controller.tool
173
174# 防止XSS攻击
175xss:
176 # 过滤开关
177 enabled: true
178 # 排除链接(多个用逗号分隔)
179 excludes: /system/notice
180 # 匹配链接
181 urlPatterns: /system/*,/monitor/*,/tool/*
182
183# 设置是否调试,调试情况可跳过接口认证
184debug: false
Jiarenxiang5f4247d2025-06-06 18:10:35 +0800185
186