SpringBoot+Thyemleaf开发环境正常,打包jar发到服务器就报错Template might not exist or might not be accessible
网上查看了各种解决的思路,总结如下:在controller层请求处理完了返回时,没有使用@RestController或@ResponseBody而返回了非json格式这种情况下返回的数据thymeleaf模板无法解析,直接报错解决方案:可以将@Controller换成@RestController,不过需要注意有没有其他的方法返回了html页面,会导致返回的不是页面而是字符串;最好的方法就是在你