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