[main] ERROR com.alibaba.druid.pool.DruidDataSource - {dataSource-1} init error

created at 06-09-2022 views: 84

main error

[main] ERROR com.alibaba.druid.pool.DruidDataSource - {dataSource-1} init error

Due to the above errors, many of the following errors will also be involved

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: com.mysql.cj.jdbc.Driver
org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: com.mysql.cj.jdbc.Driver
………………

reason

The final reason is that the version of mysql-connector-java is too low

In the jdbc configuration, the new way of writing jdbc.driver=com.mysql.cj.jdbc.Driver is written, but the import dependency is too low

It can be solved by changing the version to 8.0.11

change jbdc version

created at:06-09-2022
edited at: 06-09-2022: