IDEA报错:Could not find artifact mysql:mysql-connector-java:pom:unknown in central (https://repo.maven
·
IDEA 运行报错:Could not find artifact mysql:mysql-connector-java:pom:unknown in central (https://repo.maven.apache.org/maven2)
报错原因:Maven 找不到mysql
解决方案:由于之前IDEA dependency mysql:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
修改:在pom.xml文件中指定你的mysql版本。注意:这里mysql 的version要和本地mysql 版本一致
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.21</version> <scope>runtime</scope> </dependency>
更多推荐
已为社区贡献7条内容
所有评论(0)