6

java | com.mysql.mysql-connector 的注意点

 1 year ago
source link: https://benpaodewoniu.github.io/2022/11/17/java48/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

java | com.mysql.mysql-connector 的注意点

这个不同的版本差别很大。

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.31</version>
</dependency>

如果是 8.0.31 的版本,那么,mysql-connector-java,的前面是有 com.mysql 的。

也就是配置

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

是可以的,但是,如果 8.0.22 版本的话,拉下包来,是没有 com 的,所以,上面的配置会报错。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK