[JAVA] Loosen Thymeleaf syntax checking in Spring Boot

Overview

The default Thymeleaf used in Spring Boot 1.4 is version 2. This parses the template as XML, so it needs to be written fairly rigorously, such as requiring a closing tag. If you want to write in general HTML5 syntax, you can handle it by making Thymeleaf 3 series.

Thymeleaf 3 series

Set thymeleaf.version to the 3rd version in build.gradle.

dependencies {
    compile('org.springframework.boot:spring-boot-starter-thymeleaf')
    //Abbreviation
}

ext['thymeleaf.version'] = '3.0.3.RELEASE'
ext['thymeleaf-layout-dialect.version'] = '2.1.2'
ext['thymeleaf-extras-java8time.version'] = '3.0.0.RELEASE'
ext['thymeleaf-extras-data-attribute.version'] = '2.0.1'

Set other options as needed.

Related URL

Recommended Posts

Loosen Thymeleaf syntax checking in Spring Boot
Thymeleaf usage notes in Spring Boot
Set context-param in Spring Boot
Spring Boot 2 multi-project in Gradle
[Java] Thymeleaf Basic (Spring Boot)
Major changes in Spring Boot 1.5
NoHttpResponseException in Spring Boot + WireMock
Use thymeleaf3 with parent without specifying spring-boot-starter-parent in Spring Boot
Spring Boot Hello World in Eclipse
Spring Boot application development in Eclipse
Write test code in Spring Boot
Implement REST API in Spring Boot
What is @Autowired in Spring boot?
Implement Spring Boot application in Gradle
Launch (old) Spring Boot project in IntelliJ
Build Spring Boot + Docker image in Gradle
Static file access priority in Spring boot
Output Spring Boot log in json format
Local file download memorandum in Spring Boot
Create Java Spring Boot project in IntelliJ
[Practice! ] Display Hello World in Spring Boot
Use DynamoDB query method in Spring Boot
Implement CRUD with Spring Boot + Thymeleaf + MySQL
Implement paging function with Spring Boot + Thymeleaf
Spring Boot + Thymeleaf BootStrap installation method memo
DI SessionScope Bean in Spring Boot 2 Filter
Change session timeout time in Spring Boot
Run WEB application with Spring Boot + Thymeleaf
SameSite cookie in Spring Boot (Spring Web MVC + Tomcat)
Test controller with Mock MVC in Spring Boot
Asynchronous processing with regular execution in Spring Boot
Run a Spring Boot project in VS Code
Output request and response log in Spring Boot
Challenge Spring Boot
Use Servlet filter in Spring Boot [Spring Boot 1.x, 2.x compatible]
How to add a classpath in Spring Boot
Java tips-Create a Spring Boot project in Gradle
Create CRUD apps with Spring Boot 2 + Thymeleaf + MyBatis
Create your own Utility with Thymeleaf with Spring Boot
Spring Boot Form
How to bind to property file in Spring Boot
Spring Boot Memorandum
gae + spring boot
Annotations used in Spring Boot task management tool
View the Gradle task in the Spring Boot project
Specify the encoding of static resources in Spring Boot
Include external jar in package with Spring boot2 + Maven3
I checked asynchronous execution of queries in Spring Boot 1.5.9
If you want to separate Spring Boot + Thymeleaf processing
SSO with GitHub OAuth in Spring Boot 1.5.x environment
[Introduction to Spring Boot] Submit a form using thymeleaf
How to use CommandLineRunner in Spring Batch of Spring Boot
Test field-injected class in Spring boot test without using Spring container
Until you start development with Spring Boot in eclipse 1
Try gRPC in Spring Boot & Spring Cloud project (Mac OS)
Introduce swagger-ui to REST API implemented in Spring Boot
Until you start development with Spring Boot in eclipse 2
Specify spring.profiles.active via context-param of web.xml in Spring Boot
SerializationException in Spring Boot (1 series) + spring-security-oauth2 + Redis Session + Heroku
Database environment construction with Docker in Spring boot (IntellJ)
Inject Logger in Spring