application-dev.yml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. server:
  2. port: 8989
  3. spring:
  4. datasource:
  5. type: com.alibaba.druid.pool.DruidDataSource
  6. driver-class-name: com.mysql.cj.jdbc.Driver
  7. url: jdbc:mysql://rm-2vc2zl1990od9qvg0eo.mysql.cn-chengdu.rds.aliyuncs.com:3306/bx_charge?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  8. username: root
  9. password: 1KQaNI+vPz8^xfYcb%l6
  10. data:
  11. redis:
  12. database: 11
  13. host: 47.109.67.112
  14. port: 6379
  15. password: RUw3C4tAF0aE4PVC
  16. timeout: 10s
  17. lettuce:
  18. pool:
  19. # 连接池最大连接数 默认8 ,负数表示没有限制
  20. max-active: 8
  21. # 连接池最大阻塞等待时间(使用负值表示没有限制) 默认-1
  22. max-wait: -1
  23. # 连接池中的最大空闲连接 默认8
  24. max-idle: 8
  25. # 连接池中的最小空闲连接 默认0
  26. min-idle: 0
  27. cache:
  28. enabled: false
  29. # 缓存类型 redis、none(不使用缓存)
  30. type: redis
  31. # 缓存时间(单位:ms)
  32. redis:
  33. time-to-live: 3600000
  34. # 缓存null值,防止缓存穿透
  35. cache-null-values: true
  36. caffeine:
  37. spec: initialCapacity=50,maximumSize=1000,expireAfterWrite=600s
  38. # 邮件配置
  39. mail:
  40. host: smtp.youlai.tech
  41. port: 587
  42. username: your-email@example.com
  43. password: 123456
  44. properties:
  45. mail:
  46. smtp:
  47. auth: true
  48. starttls:
  49. enable: true
  50. # 邮件发送者
  51. from: youlaitech@163.com
  52. mybatis-plus:
  53. mapper-locations: classpath*:/mapper/**/*.xml
  54. global-config:
  55. db-config:
  56. # 主键ID类型
  57. id-type: none
  58. # 逻辑删除对应的全局属性名(注意:须是对象属性名,不能是表字段名,如 isDeleted 而非 is_deleted,否则逻辑删除失效)
  59. logic-delete-field: isDeleted
  60. # 逻辑删除-删除值
  61. logic-delete-value: 1
  62. # 逻辑删除-未删除值
  63. logic-not-delete-value: 0
  64. configuration:
  65. # 驼峰下划线转换
  66. map-underscore-to-camel-case: true
  67. # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
  68. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  69. # 安全配置
  70. security:
  71. session:
  72. type: jwt # 会话方式 jwt/redis-token
  73. access-token-time-to-live: 7200 # 访问令牌 有效期(单位:秒),默认 2 小时,-1 表示永不过期
  74. refresh-token-time-to-live: 604800 # 刷新令牌有效期(单位:秒),默认 7 天,-1 表示永不过期
  75. jwt:
  76. secret-key: SecretKey012345678901234567890123456789012345678901234567890123456789 # JWT密钥(HS256算法至少32字符)
  77. redis-token:
  78. allow-multi-login: true # 是否允许多设备登录
  79. # 安全白名单路径,仅跳过 AuthorizationFilter 过滤器,还是会走 Spring Security 的其他过滤器(CSRF、CORS等)
  80. ignore-urls:
  81. - /api/v1/auth/login/** # 登录接口(账号密码登录、手机验证码登录和微信登录)
  82. - /api/v1/auth/captcha # 验证码获取接口
  83. - /api/v1/auth/refresh-token # 刷新令牌接口
  84. - /api/v1/auth/logout # 开放退出登录
  85. - /api/v1/auth/wx/miniapp/code-login # 微信小程序code登陆
  86. - /ws/** # WebSocket接口
  87. # 非安全端点路径,完全绕过 Spring Security 的安全控制
  88. unsecured-urls:
  89. - ${springdoc.swagger-ui.path}
  90. - /doc.html
  91. - /swagger-ui/**
  92. - /v3/api-docs/**
  93. - /webjars/**
  94. - /favicon.ico
  95. # 文件存储配置
  96. oss:
  97. # OSS 类型 (目前支持aliyun、minio、local)
  98. type: minio
  99. # MinIO 对象存储服务
  100. minio:
  101. # MinIO 服务地址
  102. endpoint: http://localhost:9000
  103. # 访问凭据
  104. access-key: minioadmin
  105. # 凭据密钥
  106. secret-key: minioadmin
  107. # 存储桶名称
  108. bucket-name: youlai
  109. # (可选) 自定义域名:配置后,文件 URL 会使用该域名格式
  110. custom-domain:
  111. # 阿里云OSS对象存储服务
  112. aliyun:
  113. # 服务Endpoint
  114. endpoint: oss-cn-hangzhou.aliyuncs.com
  115. # 访问凭据`
  116. access-key-id: your-access-key-id
  117. # 凭据密钥
  118. access-key-secret: your-access-key-secret
  119. # 存储桶名称
  120. bucket-name: default
  121. # 本地存储
  122. local:
  123. # 文件存储路径 请注意下,mac用户请使用 /Users/your-username/your-path/,否则会有权限问题,windows用户请使用 D:/your-path/
  124. storage-path: /Users/theo/home/
  125. # 短信配置
  126. sms:
  127. # 阿里云短信
  128. aliyun:
  129. accessKeyId: LTAI5tSMgfxxxxxxdiBJLyR
  130. accessKeySecret: SoOWRqpjtS7xxxxxxZ2PZiMTJOVC
  131. domain: dysmsapi.aliyuncs.com
  132. regionId: cn-shanghai
  133. signName: 有来技术
  134. templates:
  135. # 注册短信验证码模板
  136. register: SMS_22xxx771
  137. # 登录短信验证码模板
  138. login: SMS_22xxx772
  139. # 修改手机号短信验证码模板
  140. change-mobile: SMS_22xxx773
  141. # springdoc配置: https://springdoc.org/properties.html
  142. springdoc:
  143. swagger-ui:
  144. path: /swagger-ui.html
  145. operations-sorter: alpha
  146. tags-sorter: alpha
  147. api-docs:
  148. path: /v3/api-docs
  149. group-configs:
  150. - group: "系统管理"
  151. paths-to-match: "/**"
  152. packages-to-scan:
  153. - com.zsElectric.boot.auth.controller
  154. - com.zsElectric.boot.system.controller
  155. - com.zsElectric.boot.platform.file.controller
  156. - com.zsElectric.boot.platform.codegen.controller
  157. default-flat-param-object: true
  158. # knife4j 接口文档配置
  159. knife4j:
  160. # 是否开启 Knife4j 增强功能
  161. enable: true # 设置为 true 表示开启增强功能
  162. # 生产环境配置
  163. production: false # 设置为 true 表示在生产环境中不显示文档,为 false 表示显示文档(通常在开发环境中使用)
  164. setting:
  165. language: zh_cn
  166. # xxl-job 定时任务配置
  167. xxl:
  168. job:
  169. # 定时任务开关
  170. enabled: false
  171. admin:
  172. # 调度中心地址,多个逗号分隔
  173. addresses: http://127.0.0.1:8080/xxl-job-admin
  174. accessToken: default_token
  175. # 执行器配置
  176. executor:
  177. appname: xxl-job-executor-${spring.application.name} # 执行器AppName
  178. address: # 执行器注册地址,默认为空,多网卡时可手动设置
  179. ip: # 执行器IP,默认为空,多网卡时可手动设置
  180. port: 9999 # 执行器通讯端口
  181. logpath: /data/applogs/xxl-job/jobhandler # 任务运行日志文件存储磁盘路径
  182. logretentiondays: 30 # 日志保存天数,值大于3时生效
  183. # 验证码配置
  184. captcha:
  185. # 验证码类型 circle-圆圈干扰验证码|gif-Gif验证码|line-干扰线验证码|shear-扭曲干扰验证码
  186. type: circle
  187. # 验证码宽度
  188. width: 120
  189. # 验证码高度
  190. height: 40
  191. # 验证码干扰元素个数
  192. interfere-count: 2
  193. # 文本透明度(0.0-1.0)
  194. text-alpha: 0.8
  195. # 验证码字符配置
  196. code:
  197. # 验证码字符类型 math-算术|random-随机字符
  198. type: math
  199. # 验证码字符长度,type=算术时,表示运算位数(1:个位数运算 2:十位数运算);type=随机字符时,表示字符个数
  200. length: 1
  201. # 验证码字体
  202. font:
  203. # 字体名称 Dialog|DialogInput|Monospaced|Serif|SansSerif
  204. name: SansSerif
  205. # 字体样式 0-普通|1-粗体|2-斜体
  206. weight: 1
  207. # 字体大小
  208. size: 24
  209. # 验证码有效期(秒)
  210. expire-seconds: 120
  211. # 微信小程配置
  212. wx:
  213. miniapp:
  214. app-id: xxxxxx
  215. app-secret: xxxxxx
  216. # ==================== AI 命令系统配置 ====================
  217. ai:
  218. # 是否启用 AI 功能
  219. enabled: false
  220. # 当前使用的提供商:qwen、deepseek、openai
  221. provider: qwen
  222. # 所有提供商配置(统一管理,扩展性强)
  223. providers:
  224. # 阿里通义千问(推荐:有免费额度)
  225. qwen:
  226. # API Key(https://bailian.console.aliyun.com/ 获取)
  227. api-key: ${QWEN_API_KEY:sk-c2941d05bf2f411ca80424fcxxxxxxxx}
  228. # Base URL(OpenAI 兼容端点)
  229. base-url: https://dashscope.aliyuncs.com/compatible-mode/v1
  230. # 模型:qwen-plus(推荐)、qwen-turbo、qwen-max、qwen-long
  231. model: qwen-plus
  232. # 显示名称
  233. display-name: 阿里通义千问
  234. # 超时时间(秒)
  235. timeout: 30
  236. # DeepSeek
  237. deepseek:
  238. api-key: ${DEEPSEEK_API_KEY:}
  239. base-url: https://api.deepseek.com/v1
  240. model: deepseek-chat
  241. display-name: DeepSeek
  242. timeout: 30
  243. # OpenAI(添加新提供商只需配置,无需修改代码)
  244. openai:
  245. api-key: ${OPENAI_API_KEY:}
  246. base-url: https://api.openai.com/v1
  247. model: gpt-4
  248. display-name: OpenAI GPT-4
  249. timeout: 60
  250. # 安全配置
  251. security:
  252. enable-audit: true
  253. dangerous-operations-confirm: true
  254. function-whitelist:
  255. - deleteUser
  256. - updateUser
  257. - queryUsers
  258. - assignRole
  259. sensitive-params:
  260. - password
  261. - idCard
  262. - bankCard
  263. - token
  264. # 限流配置
  265. rate-limit:
  266. max-executions-per-minute: 10
  267. max-executions-per-day: 100