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>
文章来源:https://www.toymoban.com/news/detail-635638.html
文章来源地址https://www.toymoban.com/news/detail-635638.html
到了这里,关于IDEA报错:Could not find artifact mysql:mysql-connector-java:pom:unknown in central (https://repo.maven的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!