开发环境 windows 10oracle jdk 1.8Maven 3.8.8IntelliJ idea 2022.2.2 问题 在使用 spring initializr 创建 Spring Boot 项目时,无法引入 Mysql-c
在使用 spring initializr 创建 Spring Boot 项目时,无法引入 Mysql-connector-j
这个依赖,报错信息:
com.mysql:mysql-connector-j:jar:unknown was not found in https://maven.aliyun.com/repository/public during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of aliyunmaven has elapsed or updates are forced
pom.xml 文件
// 父依赖 org.springframework.boot spring-boot-starter-parent 2.5.14 org.springframework.boot spring-boot-starter-WEB org.springframework.boot spring-boot-starter-test test com.mysql mysql-connector-j 8.0.32 runtime com.baomidou mybatis-plus-boot-starter 3.5.3.1
我使用的 Spring Boot 版本为 2.5.14,该版本使用的 mysql-connector-j
版本为 8.0.29,同时我的依赖是从阿里云的镜像库而不是 Maven 的中央仓库上下载的。我尝试手动引入这个版本。
com.mysql mysql-connector-j 8.0.29 runtime
结果报了同样的错误。也就是说,阿里云镜像仓库可能没有这个版本的 mysql-connector-j
。
手动引入高于 8.0.29 版本的 mysql-connector-j
即可解决。
com.mysql mysql-connector-j 8.0.32 runtime
来源地址:https://blog.csdn.net/qq_41834086/article/details/132241656
--结束END--
本文标题: 解决无法引入 mysql-connector-j 的问题
本文链接: https://www.lsjlt.com/news/429303.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
2024-05-03
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0