application.yaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. spring:
  2. application:
  3. name: dashboard
  4. # Servlet 配置
  5. servlet:
  6. # 文件上传相关配置项
  7. multipart:
  8. max-file-size: 16MB # 单个文件大小
  9. max-request-size: 32MB # 设置总上传的文件大小
  10. # Jackson 配置项
  11. jackson:
  12. serialization:
  13. write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳
  14. write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
  15. write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
  16. fail-on-empty-beans: false # 允许序列化无属性的 Bean
  17. # MyBatis Plus 的配置项
  18. mybatis-plus:
  19. configuration:
  20. map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
  21. # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 打印日志
  22. global-config:
  23. db-config:
  24. id-type: AUTO # 自增 ID
  25. logic-delete-value: 1 # 逻辑已删除值(默认为 1)
  26. logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
  27. mapper-locations: classpath*:mapper/*.xml
  28. type-aliases-package: ${yudao.info.base-package}.modules.*.dal.dataobject
  29. --- #################### 数据库相关配置 ####################
  30. spring:
  31. # 数据源配置项 TODO 多数据源;TODO 监控配置
  32. datasource:
  33. name: ruoyi-vue-pro
  34. url: jdbc:mysql://127.0.1:33061/${spring.datasource.name}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
  35. driver-class-name: com.mysql.jdbc.Driver
  36. username: root
  37. password: 123456
  38. # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
  39. redis:
  40. host: 127.0.0.1 # 地址
  41. port: 6379 # 端口
  42. database: 0 # 数据库索引
  43. --- #################### 定时任务相关配置 ####################
  44. # Quartz 配置项,对应 QuartzProperties 配置类
  45. spring:
  46. quartz:
  47. scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName
  48. job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
  49. wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
  50. properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
  51. org:
  52. quartz:
  53. # Scheduler 相关配置
  54. scheduler:
  55. instanceName: schedulerName
  56. instanceId: AUTO # 自动生成 instance ID
  57. # JobStore 相关配置
  58. jobStore:
  59. class: org.quartz.impl.jdbcjobstore.JobStoreTX # JobStore 实现类
  60. isClustered: true # 是集群模式
  61. clusterCheckinInterval: 15000 # 集群检查频率,单位:毫秒。默认为 15000,即 15 秒
  62. misfireThreshold: 60000 # misfire 阀值,单位:毫秒。
  63. # 线程池相关配置
  64. threadPool:
  65. threadCount: 25 # 线程池大小。默认为 10 。
  66. threadPriority: 5 # 线程优先级
  67. class: org.quartz.simpl.SimpleThreadPool # 线程池类型
  68. jdbc: # 使用 JDBC 的 JobStore 的时候,JDBC 的配置
  69. initialize-schema: NEVER # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ,我们手动创建表结构。
  70. --- #################### 配置中心相关配置 ####################
  71. # Apollo 配置中心
  72. apollo:
  73. bootstrap:
  74. enabled: true # 设置 Apollo 在启动阶段生效
  75. eagerLoad:
  76. enabled: true # 设置 Apollo 在日志初始化前生效,可以实现日志的动态级别配置
  77. jdbc: # 自定义的 JDBC 配置项,用于数据库的地址
  78. url: ${spring.datasource.url}
  79. username: ${spring.datasource.username}
  80. password: ${spring.datasource.password}
  81. --- #################### 监控相关配置 ####################
  82. # Actuator 监控端点的配置项
  83. management:
  84. endpoints:
  85. web:
  86. exposure:
  87. include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
  88. # Spring Boot Admin 配置项
  89. spring:
  90. boot:
  91. admin:
  92. # Spring Boot Admin Client 客户端的相关配置
  93. client:
  94. url: http://127.0.0.1:8080/${spring.boot.admin.context-path} # 设置 Spring Boot Admin Server 地址
  95. # Spring Boot Admin Server 服务端的相关配置
  96. context-path: /admin # 配置 Spring
  97. --- #################### 芋道相关配置 ####################
  98. # 芋道配置项,设置当前项目所有自定义的配置
  99. yudao:
  100. info:
  101. version: 1.0.0
  102. base-package: cn.iocoder.dashboard
  103. web:
  104. api-prefix: /api
  105. controller-package: ${yudao.info.base-package}
  106. security:
  107. token-header: Authorization
  108. token-secret: abcdefghijklmnopqrstuvwxyz
  109. token-timeout: 1d
  110. session-timeout: 30m
  111. mock-enable: true
  112. mock-secret: test
  113. swagger:
  114. title: 管理后台
  115. description: 提供管理员管理的所有功能
  116. version: ${yudao.info.base-package}
  117. base-package: ${yudao.info.base-package}.modules
  118. captcha:
  119. timeout: 5m
  120. width: 160
  121. height: 60
  122. file:
  123. base-path: http://127.0.0.1:${server.port}/${yudao.web.api-prefix}/file/get/
  124. codegen:
  125. base-package: ${yudao.info.base-package}.modules
  126. db-schemas: ${spring.datasource.name}