application.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. spring.profiles.active: dev
  2. spring:
  3. datasource:
  4. driver-class-name: com.mysql.jdbc.Driver
  5. druid:
  6. initial-size: 1
  7. max-active: 20
  8. minIdle: 1
  9. maxWait: 60000 #配置获取连接等待超时的时间
  10. timeBetweenEvictionRunsMillis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  11. minEvictableIdleTimeMillis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
  12. validationQuery: SELECT 'x'
  13. poolPreparedStatements: true
  14. maxPoolPreparedStatementPerConnectionSize: 20
  15. # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  16. filters: stat,wall,log4j
  17. # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
  18. connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
  19. # 合并多个DruidDataSource的监控数据
  20. #useGlobalDataSourceStat: true
  21. mvc:
  22. favicon:
  23. enabled: false
  24. # thymeleaf
  25. thymeleaf:
  26. prefix: classpath:/templates/
  27. check-template-location: true # 这个可以不配置,检查模板位置
  28. suffix: .html
  29. encoding: UTF-8
  30. content-type: text/html
  31. mode: HTML5
  32. ---
  33. spring:
  34. profiles: dev
  35. datasource:
  36. url: jdbc:mysql://localhost:3306/dup_report?useUnicode=true&characterEncoding=utf8&useSSL=false
  37. username: root
  38. password: qyff2011
  39. thymeleaf:
  40. cache: false # 这个开发配置为false,避免改了模板还要重启服务器
  41. server:
  42. port: 8090
  43. logging:
  44. level:
  45. com.mooctest: debug
  46. pattern:
  47. console: "%d{yyyy-MM-dd HH:mm:ss} [%p] [%t] [%c] %m%n"