欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

exception processing, template error resolving template

程序员文章站 2022-08-10 09:42:16
错误信息:Exception processing template “/view/df”: Error resolving template “/view/df”, template might not exist or might not be accessible by any of the ......

错误信息: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