META-INF.config.druid-filters.properties Maven / Gradle / Ivy
# Uses slf4j as the log system.
spring.datasource.config.druid.filter.slf4j-enabled=true
spring.datasource.config.druid.filter.slf4j.data-source-log-enabled=true
spring.datasource.config.druid.filter.slf4j.connection-log-enabled=false
spring.datasource.config.druid.filter.slf4j.connection-log-error-enabled=true
spring.datasource.config.druid.filter.slf4j.statement-log-enabled=true
spring.datasource.config.druid.filter.slf4j.statement-log-error-enabled=true
spring.datasource.config.druid.filter.slf4j.statement-sql-pretty-format=false
spring.datasource.config.druid.filter.slf4j.statement-parameter-set-log-enabled=false
spring.datasource.config.druid.filter.slf4j.statement-prepare-after-log-enabled=false
spring.datasource.config.druid.filter.slf4j.statement-close-after-log-enabled=false
spring.datasource.config.druid.filter.slf4j.statement-executable-sql-log-enable=true
spring.datasource.config.druid.filter.slf4j.result-set-log-enabled=false
spring.datasource.config.druid.filter.slf4j.result-set-log-error-enabled=true
# Enable data statistics.
spring.datasource.config.druid.filter.stat-enabled=true
# SQL that executes more than 300ms is considered slow SQL and is recorded in the slow SQL log.
spring.datasource.config.druid.filter.stat.slow-sql-millis=300
spring.datasource.config.druid.filter.stat.log-slow-sql=true
# After SQL is parameterized, it is merged.
spring.datasource.config.druid.filter.stat.merge-sql=true
# Enable SQL wall.
spring.datasource.config.druid.filter.wall-enabled=true
# Record a log of violations.
spring.datasource.config.druid.filter.wall.log-violation=true
# To avoid affecting the business, the intercepted SQL does not enable exception throwing temporarily.
spring.datasource.config.druid.filter.wall.throw-exception=false
# Intercept SQL that does not provide a WHERE condition.
spring.datasource.config.druid.filter.wall-config.delete-where-none-check=true
# Configure the maximum number of returned rows. If the select statement does not specify the maximum number of returned rows, the select will be automatically modified to add the return limit.
# There are currently bugs in Druid, wait until repaired before letting go.
# https://github.com/alibaba/druid/issues/2649
# spring.datasource.config.druid.filter.wall-config.selectLimit=200