我是春季靴子的初学者。我正在尝试使用thymeleaf和html在localhost 8080上显示文本。尝试下载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”
有一个文件:
弹簧引导引物thymeleaf-1.5.10.RELEASE.pom.lastUpdated
内容:
NOTE: This is an Aether internal implementation file, its format can be changed without prior notice. #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=Could not transfer artifact 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 path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
其他依赖项,如spring-boot-starter-web或guava正常工作。 2.0.0.REALESE和其他人的问题是相同的。我会很感激任何建议。
和我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
HTTP://maven.Apache.org/下水道/maven-4.0.0.下水道">
<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>
你的父母应该是:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
依赖应该是:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
从依赖中删除<version>1.5.10.RELEASE</version>
并检查。