问题描述
我是 springboot 的初学者.我正在尝试使用 thymeleaf 和 html 在 localhost8080 上显示文本.尝试在 maven 中下载依赖项后:
<groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId><version>1.5.10.RELEASE</version></依赖>
我收到这条消息:
无法读取 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 从/传输到中央 (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.
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>AKBootCamp8</groupId><artifactId>kwejk</artifactId><version>1.0-SNAPSHOT</version><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>1.5.10.RELEASE</version><relativePath/><!-- 从存储库中查找父级 --></父母><依赖项><依赖><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><version>1.5.10.RELEASE</version></依赖><依赖><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></依赖></依赖项>
你的父母应该:
<groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>1.5.10.RELEASE</version><relativePath/><!-- 从存储库中查找父级 --></父母>
依赖应该是:
<groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></依赖>
从依赖项中删除 并检查.
I am a beginner in springboot. I'm trying to use thymeleaf and html to display the text on localhost8080. After trying to download dependencies in maven:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>1.5.10.RELEASE</version>
</dependency>
I get this message:
in the folder:
there is a file:
with the content:
other dependencies such as spring-boot-starter-web or guava work correctly. Problem is the same for 2.0.0.REALESE and others. I will be grateful for any advice.
and my pom.
<?
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>
Your parent should be:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.10.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
And dependency should be:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
Remove <version>1.5.10.RELEASE</version>
from dependency and check.
这篇关于Java spring boot starter-thymeleaf - 无法找到请求目标的有效认证路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!