Open m949976269 opened 7 years ago
spring: datasource: name: testdb url: jdbc:mysql://172.16.5.23:3306/vp_common_config?useUnicode=true&characterEncoding=utf-8 username: root password: 'mQO7NpV1ohNjA37/xSIsNCIlVY4woR+zuAyeD3dBPpwcUX75gsZbvJftqhtpESDvItn6MUlJwrAAsi5+65fySQ=='
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
maxActive: 20
initialSize: 1
maxWait: 28800
minIdle: 1
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 3000
validationQuery: select 'x'
testWhileIdle: true
testOnBorrow: true
testOnReturn: false
poolPreparedStatements: true
maxOpenPreparedStatements: 20
# encrypt password
filters: config,stat,wall,log4j
connectionProperties: "config.decrypt=true;druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000"
useGlobalDataSourceStat: true
data: mongodb: host: 172.16.45.3 port: 27017
redis: database: 0 host: 172.16.45.3
port: 6379
timeout: 30000
pool:
max-idle: 8
min-idle: 0
max-active: 8
max-wait: -1
我使用springboot1.4.1,发现spring.datasource. filters无法被自动配置, 打开监控页面的数据源查看,发现filters一项为空。 如果我改成javaconfig方式,@bean一个DruidDataSource并且setFilters才成功使用stat等插件。另外initialSize、maxActive...这些参数也无法被springboot设置。请问问题出在那里?
spring boot 哪个版本 确定连接池那些配置会生效?
plz