我是springboot的初学者 . 我正在尝试使用thymeleaf和html在localhost8080上显示文本 . 尝试下载maven中的依赖项后:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>1.5.10.RELEASE</version>
</dependency>
我收到这条消息:
无法读取org.springframework.boot的工件描述符:spring-boot-starter-thymeleaf:jar:1.5.10.RELEASE
在文件夹中:
“C:\ Users \ myUser \ .m2 \ repository \ org \ Spring Framework \ boot \ spring-boot-primer-thymeleaf \ 1.5.10.RELEASE”
有一个文件:
spring-boot-primer-thymeleaf-1.5.10.RELEASE.pom.lastUpdated
内容:
注意:这是Aether内部实施文件,其格式可以更改,恕不另行通知 . #Sat Mar 03 08:48:15 CET 2018 @ default-central-ttps://repo.maven.apache.org/maven2/.lastUpdated=1520063295482 https://repo.maven.apache.org/maven2/.error =无法传输工件org.springframework.boot:spring-boot-starter-thymeleaf:pom:1.5.10.RELEASE from / to central(https://repo.maven.apache.org/maven2):sun.security . validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径
其他依赖项,如spring-boot-starter-web或guava正常工作 . 2.0.0.REALESE和其他人的问题是相同的 . 我会很感激任何建议 .
和我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd“>
<modelVersion>4.0.0</modelVersion>
<groupId>AKBootCamp8</groupId>
<artifactId>kwejk</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.5.10.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
1 回答
你的父母应该是:
依赖应该是:
从依赖项中删除
<version>1.5.10.RELEASE</version>
并检查 .