springboot + thymeleaf 打成jar包后无法访问静态文件
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