Showing
1 changed file
with
2 additions
and
0 deletions
@@ -110,6 +110,8 @@ public class DataSourceConfig { | @@ -110,6 +110,8 @@ public class DataSourceConfig { | ||
110 | dataSource.setPassword(passWord);// 密码 | 110 | dataSource.setPassword(passWord);// 密码 |
111 | dataSource.setInitialSize(initialSize); | 111 | dataSource.setInitialSize(initialSize); |
112 | dataSource.setMaxActive(maxTotal); | 112 | dataSource.setMaxActive(maxTotal); |
113 | + dataSource.setRemoveAbandoned(true); | ||
114 | + dataSource.setRemoveAbandonedTimeout(1800); | ||
113 | // dataSource.setMaxIdle(maxIdle); | 115 | // dataSource.setMaxIdle(maxIdle); |
114 | dataSource.setMinIdle(minIdle); | 116 | dataSource.setMinIdle(minIdle); |
115 | dataSource.setQueryTimeout(defaultQueryTimeout); | 117 | dataSource.setQueryTimeout(defaultQueryTimeout); |
-
Please register or login to post a comment