冬雨财经 发表于 2024-8-24 01:17:35

The artifact mysql:mysql-connector-java:jar:8.0.33 has been relocated

项目在打包的时候提示 The artifact mysql:mysql-connector-java:jar:8.0.33 has been relocated to com.mysql:mysql-connector-j:jar:8.0.33,这个提示就是说此模块已经迁徙到新的位置了。
进入Mvn Repository,查询 mysql-connector-java 能看到以下提示:

https://img-blog.csdnimg.cn/img_convert/61d8c7c723b2cd4681bddfd2ef29c2a1.png

就说明了已迁徙至的位置,直接点击This artifact was moved to 下面的链接,跳转至 MySQL Connector/J:

https://img-blog.csdnimg.cn/img_convert/d7c8292dc52e1448886fa670eadc474e.png
然后在MySQL Connector/J页面点击8.0.33,直接拷贝出来更换pox.xml里的mysql-connector-java:

https://img-blog.csdnimg.cn/img_convert/25984d9884d3e073f7136a041d3580b1.png
很多同砚打不开MvnRepository,可直接复制下方代码:
<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    <version>8.0.33</version>
</dependency>
pom.xml中更换:

https://img-blog.csdnimg.cn/img_convert/f9c7f950e604d495be61c94eb1f8b728.png
再来打包,就没有以上警告了:
https://img-blog.csdnimg.cn/img_convert/e8cc1f1799f8f8e3f971cc3fcf65f81b.png

参考:The artifact mysql:mysql-connector-java:jar:8.0.33 has been relocated to com.mysql:mysql-connector-j:jar:8.0.33-技术分享-老麻


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: The artifact mysql:mysql-connector-java:jar:8.0.33 has been relocated