Spring Boot + Thymeleaf 解決self-closing tags問題

1. 添加maven依賴html

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

2. 更改application.properties屬性spring

spring.thymeleaf.mode=LEGACYHTML5app

相關文章
相關標籤/搜索