POM文件添加nekohtml
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
</dependency>
application.properties添加thymeleaf指定静态文件目录位置
spring.thymeleaf.prefix=classpath:/templates
spring.thymeleaf.mode=LEGACYHTML5
spring.thymeleaf.suffix=.html
spring.thymeleaf.encoding=utf-8
随手记账单小程序 期待大家的反馈


本文介绍如何在项目中配置Thymeleaf模板引擎,并通过POM文件引入NekoHTML依赖,实现HTML解析与渲染。详细展示了application.properties文件中关于Thymeleaf的配置参数,包括前缀、模式、后缀及编码设置。
1732

被折叠的 条评论
为什么被折叠?



