您好,登錄后才能下訂單哦!
報錯信息:
ERROR c.alibaba.druid.pool.DruidDataSource - recyle error
java.sql.SQLException: Connection.clearWarnings cannot be called on a closed connection
at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getSqlException(ExceptionMapper.java:271)
at org.mariadb.jdbc.MariaDbConnection.clearWarnings(MariaDbConnection.java:1070)
at com.alibaba.druid.filter.FilterChainImpl.connection_clearWarnings(FilterChainImpl.java:165)
at com.alibaba.druid.filter.FilterAdapter.connection_clearWarnings(FilterAdapter.java:771)
at com.alibaba.druid.filter.FilterChainImpl.connection_clearWarnings(FilterChainImpl.java:161)
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.clearWarnings(ConnectionProxyImpl.java:108)
at com.alibaba.druid.pool.DruidConnectionHolder.reset(DruidConnectionHolder.java:295)
at com.alibaba.druid.pool.DruidDataSource.recycle(DruidDataSource.java:1662)
問題:
spring.datasource.druid.initial-size=1
spring.datasource.druid.min-idle=1
spring.datasource.druid.max-active=20
spring.datasource.druid.test-on-borrow=true
spring.datasource.druid.stat-view-servlet.allow=true
spring.datasource.druid.max-wait=60000
解決方案:
spring.datasource.druid.initial-size=1
spring.datasource.druid.min-idle=1
spring.datasource.druid.max-active=20
spring.datasource.druid.test-on-borrow=false
spring.datasource.druid.test-while-idle=true
spring.datasource.druid.validation-query=select 'X'
因為少配置了這個所以拿到了連接不檢查,哭暈.........
怪自己太年輕......
spring.datasource.druid.validation-query=select 'X'
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。