我是春季靴的初学者。我正在尝试使用 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: \ 用户 \ myUser \ .m2 \ 存储库 \ org \ Spring Framework \ boot \ spring-boot-primer-thymeleaf \ 1.5.10.RELEASE">
有一个文件:
弹簧启动底漆百里香叶-1.5.10.发布.pom.last更新
内容如下:
注意:这是一个以太内部实现文件,其格式可以在不事先通知的情况下更改。 #Sat 三月 03 08:48:15 CET 2018 @default-central- ttps://repo.maven.apache.org/maven2/.lastUpdated=1520063295482 https://repo.maven.apache.org/maven2/.error=Could 不转移工件 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.SunCertPathBuilder异常:找不到请求目标的有效证书路径
其他依赖项,如 spring-boot-starter-web 或 Guava 可以正常工作。问题与2.0.0.REALESE和其他问题相同。我将不胜感激任何建议。
还有我的绒球.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>
你的父母应该是:
<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>
并进行检查。