c3p0连接数据库报错 No suitable driver

我的问题: c3p0-config.xml文件放错了地方

应该放的位置:
c3p0连接数据库报错 No suitable driver_第1张图片
c3p0-config.xml文件甚至不能放在src下的包中。

另外附上我的c3p0-config.xml

"1.0" encoding="UTF-8"?>

	
		"driverClass">com.mysql.cj.jdbc.Driver
		"jdbcUrl">
			jdbc:mysql://localhost:3306/class?serverTimezone=UTC
		
		"user">root
		"password">123456
		"initialPoolSize">10
		"maxPoolSize">100
		"minPoolSize">60
		"maxStatements">200
	
	"mysql5">
		"driverClass">com.mysql.jdbc.Driver
		"jdbcUrl">jdbc:mysql://localhost:3306/class?serverTimezone=UTC
		"user">root
		"password">
		"initialPoolSize">30
		"maxPoolSize">60
	
	"mysql8">
		"driverClass">com.mysql.cj.jdbc.Driver
		"jdbcUrl">jdbc:mysql://localhost:3306/class?serverTimezone=UTC
		
		"user">root
		"password">123456
		"initialPoolSize">300
		"maxPoolSize">400
	

你可能感兴趣的:(javaweb,mysql)