fix: 日志记录转换成Druid的打印日志
This commit is contained in:
@@ -14,23 +14,5 @@ nl:
|
||||
port: 6379
|
||||
password: null
|
||||
database: 1
|
||||
oracle:
|
||||
ip: 172.27.37.66
|
||||
port: 1521
|
||||
scheme: RTMES
|
||||
username: LMSTELCOM
|
||||
password: LMSTELCOM_6463
|
||||
sqlserver:
|
||||
ip: 10.93.41.2
|
||||
port: WINCC
|
||||
username: sa
|
||||
password: 123
|
||||
database: 马钢_RH
|
||||
dm:
|
||||
ip: localhost
|
||||
port: 5236
|
||||
scheme: NLADMIN
|
||||
username: NLADMIN
|
||||
password: 123456789
|
||||
logging-path: C:\log\wms
|
||||
dynamic-log-path: C:\log\lms
|
||||
|
||||
@@ -33,7 +33,7 @@ spring:
|
||||
max-pool-prepared-statement-per-connection-size: 20 #当值大于20时poolPreparedStatements会自动修改为true
|
||||
#通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
use-global-data-source-stat: true #合并多个DruidDataSource的监控数据
|
||||
# use-global-data-source-stat: true #合并多个DruidDataSource的监控数据
|
||||
#filters通过别名的方式配置扩展插件,常用的插件有:
|
||||
#监控统计用的filter:stat 日志用的filter:log4j 防御sql注入的filter:wall
|
||||
filter:
|
||||
@@ -61,24 +61,25 @@ spring:
|
||||
username: ${DB_USER:${nl.config.mysql.username}}
|
||||
password: ${DB_PWD:${nl.config.mysql.password}}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
oracle:
|
||||
driver-class-name: oracle.jdbc.OracleDriver
|
||||
url: jdbc:oracle:thin:@${nl.config.oracle.ip}:${nl.config.oracle.port}:${nl.config.oracle.scheme}
|
||||
username: ${DB_USER:${nl.config.oracle.username}}
|
||||
password: ${DB_PWD:${nl.config.oracle.password}}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
sqlserver:
|
||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
url: jdbc:sqlserver://${nl.config.sqlserver.ip}\${nl.config.sqlserver.port};DatabaseName=${nl.config.sqlserver.database}
|
||||
username: ${DB_USER:${nl.config.sqlserver.username}}
|
||||
password: ${DB_PWD:${nl.config.sqlserver.password}}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
dm:
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
url: jdbc:dm://${nl.config.dm.ip}:${nl.config.dm.port}/${nl.config.dm.scheme}?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
|
||||
username: ${nl.config.dm.username}
|
||||
password: ${nl.config.dm.password}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
filters:
|
||||
DruidFilter,stat
|
||||
initial-size: 5 #初始化时建立物理连接的个数
|
||||
min-idle: 15 #最小连接池数量
|
||||
maxActive: 30 #最大连接池数量
|
||||
maxWait: 3000 #获取连接时最大等待时间,单位毫秒
|
||||
#申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
|
||||
test-while-idle: true
|
||||
time-between-eviction-runs-millis: 300000 #既作为检测的间隔时间又作为test-while-idle执行的依据
|
||||
min-evictable-idle-time-millis: 900000 #销毁线程时检测当前连接的最后活动时间和当前时间差大于该值时,关闭当前连接
|
||||
#用来检测连接是否有效的sql
|
||||
#mysql中为 select 'x'
|
||||
#oracle中为 select 1 from dual
|
||||
validation-query: SELECT 'x' FROM DUAL
|
||||
test-on-borrow: true #申请连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
|
||||
test-on-return: false #归还连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
|
||||
pool-prepared-statements: true #是否缓存preparedStatement,mysql5.5+建议开启
|
||||
max-pool-prepared-statement-per-connection-size: 20 #当值大于20时poolPreparedStatements会自动修改为true
|
||||
flyway:
|
||||
#开启
|
||||
enabled: false
|
||||
@@ -235,7 +236,7 @@ mybatis-plus:
|
||||
map-underscore-to-camel-case: false
|
||||
call-setters-on-nulls: true
|
||||
jdbc-type-for-null: null
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
mapper-locations:
|
||||
- classpath:/org/nl/**/mapper/**/*.xml
|
||||
global-config:
|
||||
|
||||
Reference in New Issue
Block a user