连接MySQL DB的这两个Maven依赖项之间有什么区别:
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency>
和/或
<dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> </dependency>
l5tcr1uw1#
Mysql重命名了连接器:https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-31.html您应该使用MySQL Connector/J如果您使用的是Spring-Boot-3.0以上版本,则需要使用MySQL Connector/J
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#mysql-jdbc-driver
1条答案
按热度按时间l5tcr1uw1#
Mysql重命名了连接器:
https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-31.html
您应该使用MySQL Connector/J
如果您使用的是Spring-Boot-3.0以上版本,则需要使用MySQL Connector/J
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#mysql-jdbc-driver