我有以下Thymeleaf片段
<th:block th:replace="~{'/login/' + ${loginBanner} :: ${loginBanner}}"></th:block>
在控制器中,我将loginBanner
设置为
model.addAttribute("loginBanner", "login-banner-unauthorized");
login-banner-unauthorized
片段位于src/main/resources/templates/login/login-banner-unauthorized.html
中
我得到以下错误
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/login/login-banner-unauthorized], template might not exist or might not be accessible by any of the configured Template Resolvers (template: "index" - line 23, col 19)
当从InteliJ运行应用程序时,一切正常,但当我将jar部署到云时,我得到了上面的错误。
1条答案
按热度按时间dkqlctbz1#
以下解决了此问题
注意
login
前面的正斜杠被删除