648540858
2022-09-05 cfe9c762d680569136d0246ab61c79cd7e4eba50
src/main/resources/application-dev.yml
@@ -20,7 +20,7 @@
    datasource:
        type: com.alibaba.druid.pool.DruidDataSource
        driver-class-name: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false
        url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true
        username: root
        password: 123456
        druid:
@@ -36,7 +36,7 @@
            poolPreparedStatements: false         # 是否開啟PSCache,並且指定每個連線上PSCache的大小
            timeBetweenEvictionRunsMillis: 60000  # 配置間隔多久才進行一次檢測,檢測需要關閉的空閒連線,單位是毫秒
            minEvictableIdleTimeMillis: 300000    # 配置一個連線在池中最小生存的時間,單位是毫秒
            filters: stat,wall,slf4j             # 配置监控统计拦截的filters,监控统计用的filter:sta, 日志用的filter:log4j, 防御sql注入的filter:wall
            filters: stat,slf4j             # 配置监控统计拦截的filters,监控统计用的filter:sta, 日志用的filter:log4j
            useGlobalDataSourceStat: true         # 合并多个DruidDataSource的监控数据
            # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
            connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=1000