使用c3p0时报这个错误
在connection和prepareStatement处,都进行了强转并且报上面类似的错误
原因是包导错了,应该导入java.sql.connection 而不是com.mysql.jdbc.PreparedStatement;
对于jdbc的理解,可以看看这篇文章 数据库连接池
使用c3p0时报这个错误
在connection和prepareStatement处,都进行了强转并且报上面类似的错误
原因是包导错了,应该导入java.sql.connection 而不是com.mysql.jdbc.PreparedStatement;
对于jdbc的理解,可以看看这篇文章 数据库连接池