Thymeleaf template does not load Laytou:Fragment

Asked

Viewed 20 times

-1

I am trying to insert a form fragment via Thymeleaf template engine in springboot. However, it is loading the template and other inserted parts except the form (bootstrap elements).

OBS:

  • Load the referenced template minus fragment

  • Loads other fragments than the form

  • POM.XML FILE - The current dependencies of Thymeleaf have been inserted

  • bootstrap.min.css version 5.0

  • bootstrap.min.js version 5.0

  • Springboot version 4.10

  • Thymeleaf version 2.4.3

POM.XML FILE

4.0.0 org.springframework.boot spring-boot-Starter-Parent 2.4.3 with algaworks. snake 0.0.1-SNAPSHOT War snake Demo project for Spring Boot <java.version>14</java.version> org.springframework.boot spring-boot-Starter-data-jpa org.springframework.boot spring-boot-Starter-Thymeleaf nz.net.ultraq.Thymeleaf Thymeleaf-layout-dialect org.springframework.boot spring-boot-Starter-web mysql mysql-Connector-java Runtime org.springframework.boot spring-boot-Starter-Tomcat provided org.springframework.boot spring-boot-Starter-test test org.springframework.boot spring-boot-devtools

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

STANDARD TEMPLATE FILE

Collection

test

<script src="/js/jquery-3.6.0.min.js"></script>
<script src="/js/bootstrap.min.js"></script>

FRAGMENT ARCHIVE

Title registration Title Saved With Success. New Title Description Date Valor Status Save

1 answer

0

I was able to fix it by fixing the bootstrap version.

as it was using the most current beta, possibly Thymeleaf was incompatible with some classes.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.