springboot對於沒有閉合的html標籤報錯解決方法

在pom.xml中添加依賴html

<dependency>
        <groupId>net.sourceforge.nekohtml</groupId>
        <artifactId>nekohtml</artifactId>
        <version>1.9.22</version>
    </dependency>

在application.properties中修改thymeleaf的配置spring

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=falseapp

解決問題spa

相關文章
相關標籤/搜索