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