0
votes

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:

Failed to read artifact descriptor for org.springframework.boot: spring-boot-starter-thymeleaf: jar: 1.5.10.RELEASE

in the folder:

"C: \ Users \ myUser \ .m2 \ repository \ org \ Spring Framework \ boot \ spring-boot-primer-thymeleaf \ 1.5.10.RELEASE"

there is a file:

spring-boot-primer-thymeleaf-1.5.10.RELEASE.pom.lastUpdated

with the content:

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

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.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

1 Answers

0
votes

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.