解决idea Could not transfer artifact org.springframework.bootspring-b

报错代码
Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE from/to alimaven (https://maven.aliyun.com/repository/central): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

解决方案1:

原因:证书问题
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

在这里插入图片描述

添加的内容

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

解决方安2:修改镜像地址
由于默认是外国的,可能导致下载问题 ----> 设置国内镜像网站

路径

在这里插入图片描述
在这里添加(我已经添加过了,默认是没有的)

在这里插入图片描述

提供一个阿里云的地址

 <mirror>
		<id>nexus-aliyun</id>
		<mirrorOf>central</mirrorOf>
		<name>Nexus aliyun</name>
		<url>https://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>

其他方法:
做到这里,我的问题已经解决了,如果这里你还是没有解决且你是第一次使用maven做项目,那么极有可能是你的maven出了问题,方法就是删除重新配(不要想着改他),我之前的3.6.0和3.6.3都不知道出了什么问题,目前的版本是3.5.2

扫描二维码关注公众号,回复: 13740779 查看本文章

猜你喜欢

转载自blog.csdn.net/m0_54850467/article/details/123714773