application.yaml 5.0 KB

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