1.用c3p0解决mysql8小时问题
问题:用c3p0解决mysql8小时问题报错,原因是无效的属性的driverClassName和username,以下是报错内容:
Invalid property 'driverClassName' of bean class [com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property 'driverClassName' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
解决方案是:把原来的driverClassName改成driverClass,username改成user,因为在c3p0数据源的里面没有driverClassName和username这两个属性。
com.mchange.v2.c3p0.ComboPooledDataSource这个包中只有这两个属性driverClass和user。
网友评论