application-dev.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Spring配置
  2. spring:
  3. # 服务模块
  4. devtools:
  5. restart:
  6. # 热部署开关
  7. enabled: true
  8. # redis 配置
  9. redis:
  10. # 地址
  11. host: 127.0.0.1
  12. # 端口,默认为6379
  13. port: 6379
  14. # 数据库索引
  15. database: 0
  16. # 密码
  17. password:
  18. # 连接超时时间
  19. timeout: 10s
  20. lettuce:
  21. pool:
  22. # 连接池中的最小空闲连接
  23. min-idle: 0
  24. # 连接池中的最大空闲连接
  25. max-idle: 8
  26. # 连接池的最大数据库连接数
  27. max-active: 8
  28. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  29. max-wait: -1ms
  30. datasource:
  31. type: com.alibaba.druid.pool.DruidDataSource
  32. driverClassName: com.mysql.cj.jdbc.Driver
  33. druid:
  34. # 主库数据源
  35. master:
  36. url: jdbc:mysql://localhost:3306/cadmin-mybatis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  37. username: root
  38. password: root
  39. # 从库数据源
  40. slave:
  41. # 从数据源开关/默认关闭
  42. enabled: false
  43. url: jdbc:mysql://localhost:3306/cadmin-mybatis?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  44. username: root
  45. password: root
  46. # 初始连接数
  47. initialSize: 5
  48. # 最小连接池数量
  49. minIdle: 10
  50. # 最大连接池数量
  51. maxActive: 20
  52. # 配置获取连接等待超时的时间
  53. maxWait: 60000
  54. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  55. timeBetweenEvictionRunsMillis: 60000
  56. # 配置一个连接在池中最小生存的时间,单位是毫秒
  57. minEvictableIdleTimeMillis: 300000
  58. # 配置一个连接在池中最大生存的时间,单位是毫秒
  59. maxEvictableIdleTimeMillis: 900000
  60. # 配置检测连接是否有效
  61. validationQuery: SELECT 1 FROM DUAL
  62. testWhileIdle: true
  63. testOnBorrow: false
  64. testOnReturn: false
  65. webStatFilter:
  66. enabled: true
  67. statViewServlet:
  68. enabled: true
  69. # 设置白名单,不填则允许所有访问
  70. allow:
  71. url-pattern: /druid/*
  72. # 控制台管理用户名和密码
  73. login-username:
  74. login-password:
  75. filter:
  76. stat:
  77. enabled: true
  78. # 慢SQL记录
  79. log-slow-sql: true
  80. slow-sql-millis: 1000
  81. merge-sql: true
  82. wall:
  83. config:
  84. multi-statement-allow: true
  85. # token配置
  86. token:
  87. # 令牌自定义标识
  88. header: Authorization
  89. # 令牌密钥
  90. secret: abcdefghijklmnopqrstuvwxyz
  91. # 令牌有效期(默认30分钟)
  92. expireTime: 30
  93. # Swagger配置
  94. swagger:
  95. # 是否开启swagger
  96. enabled: true
  97. # 请求前缀
  98. pathMapping: /dev-api
  99. # 日志配置
  100. logging:
  101. level:
  102. com.emato: debug
  103. org.springframework: info