spring-boot JDBC 链接失败
com.mysql.cj.jdbc.Driver or com.mysql.jdbc.Driver
- Loading class
com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. - java.sql.SQLException: The server time zone value ‘�й���ʱ��’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
- com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
这里一定要注意 自己工程所依赖的jdbc 版本,详见 MySql 8.0及对应驱动包匹配注意点-



本文详细解析了在使用Spring Boot进行JDBC连接时遇到的常见错误,包括过时的驱动加载、时区配置问题以及HikariCP池初始化异常。针对这些问题,文章提供了具体的解决策略,强调了正确配置MySQL驱动版本的重要性。
5717

被折叠的 条评论
为什么被折叠?



