springboot对于没有闭合的html标签报错解决方法

在pom.xml中添加依赖


net.sourceforge.nekohtml
nekohtml
1.9.22

在application.properties中修改thymeleaf的配置

spring.thymeleaf.prefix=classpath:templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.mode=LEGACYHTML5
spring.thymeleaf.encoding=UTF-8
spring.thymeleaf.content-type=text/html
spring.thymeleaf.cache=false

解决问题

posted @ 2017-12-20 21:18  ll7  阅读(1456)  评论(0)    收藏  举报