原文轉:https://blog.csdn.net/qq_37909508/article/details/83028536apache
報錯:mybatis
NewProxyPreparedStatement.isClosed()Z is abstract和org.apache.commons.dbcp.DelegatingPreparedStatement.isClosed()Zspa
緣由是mybati.jar與c3p0或dbcp的兼容性問題,居然出現了mybatis3.4沒法兼容他們。.net
解決方法,要麼將c3p0或dbcp版本提升,要麼將mybatis版本改爲2.幾的就好了。code
<!-- Mybatis --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4.6</version> </dependency> <!-- <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.2.2</version> </dependency> --> <!-- 改成最新版本 --> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> </dependency>