启动server出现以下错误
HTTP Status 500 - Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (Could not create connection to database server.)
网上搜索一番解决方案,问题汇总有以下几种:
- Mysql功能未开启
- 代码错误
- 导包问题
- 驱动版本与jar包问题
- 等等…
经过我严格地检查过后,第1~3问题都没有出现,
而这里我遇到的问题恰好是第四种,驱动版本的问题
我使用的是:
将其替换为:
错误解决了。