exception processing, template error resolving template

错误信息:Exception processing template “/view/df”: Error resolving template “/view/df”, template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.exceptions.TemplateInputException: Error resolving template “/view/df”, template might not exist or might not be accessible by any of the configured Template Resolvers

错误描述:再开发环境下,访问不出错。打成jar包后运行出错,经过一番查看,最终找到原因。
特别说明该项目我是用的是Thymeleaf的th标签。
原因:在控制器中返回的视图路径如下,return “/view/df” 修改前,修改为return “view/df” 即可,然后再重新打包访问,问题解决了。该问题是由于路径的问题导致的。

参考博客:
https://blog.csdn.net/Lin_xiaofeng/article/details/79122053
https://blog.csdn.net/PubliclyAccessible/article/details/79726360
https://blog.csdn.net/u012613251/article/details/80304722

posted @ 2019-01-18 16:56  明天,你好啊  阅读(12260)  评论(0编辑  收藏  举报