|
|
@@ -67,6 +67,9 @@ public class DruidDBConfiguration {
|
|
|
@Value("${spring.datasource.removeAbandoned}")
|
|
|
private boolean removeAbandoned;
|
|
|
|
|
|
+ @Value("${spring.datasource.removeAbandonedTimeout}")
|
|
|
+ private int removeAbandonedTimeout;
|
|
|
+
|
|
|
@Value("${spring.datasource.poolPreparedStatements}")
|
|
|
private boolean poolPreparedStatements;
|
|
|
|
|
|
@@ -79,9 +82,6 @@ public class DruidDBConfiguration {
|
|
|
@Value("${spring.datasource.connectionProperties}")
|
|
|
private String connectionProperties;
|
|
|
|
|
|
- @Value("${spring.datasource.removeAbandonedTimeout}")
|
|
|
- private int removeAbandonedTimeout;
|
|
|
-
|
|
|
@Bean("dataSource")
|
|
|
@Primary
|
|
|
public DataSource dataSource() {
|
|
|
@@ -104,9 +104,9 @@ public class DruidDBConfiguration {
|
|
|
datasource.setTestOnBorrow(testOnBorrow);
|
|
|
datasource.setTestOnReturn(testOnReturn);
|
|
|
datasource.setRemoveAbandoned(removeAbandoned);
|
|
|
+ datasource.setRemoveAbandonedTimeout(removeAbandonedTimeout);
|
|
|
datasource.setPoolPreparedStatements(poolPreparedStatements);
|
|
|
datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
|
|
|
- datasource.setRemoveAbandonedTimeout(removeAbandonedTimeout);
|
|
|
try {
|
|
|
datasource.setFilters(filters);
|
|
|
} catch (SQLException e) {
|