spring-boot使用thymeleaf时,避免要求过于严格,运行报错,可以进行如下配置
maven配置:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> <version>1.4.3.RELEASE</version> </dependency> <dependency> <groupId>net.sourceforge.nekohtml</groupId> <artifactId>nekohtml</artifactId> <version>1.9.22</version> </dependency>
application.properties
spring.thymeleaf.mode =LEGACYHTML5