springboot错误汇总

Q:thymeleaf在开发环境正常,但用jar运行时报错 Error resolving template template might not exist or might not be accessible

A:原因是指向模板的路径前有斜杆/,就会出错,去掉就正常了(路径前不能带斜杆,类似相对路径的写法)增加配置spring.thymeleaf.prefix=classpath:/templates也能解决

原文地址:https://www.cnblogs.com/growingpains/p/8334184.html