解決Error resolving template "XXX", template might not exist or might not be accessible by any of the

項目在本地tomcat上運行沒有問題,

打成jar包後運行報錯:

Error resolving template "/rule/list", template might not exist or might not be accessible by any of the configured Template Resolvers

解決方案1:

return時去掉/即可

 

解決方案2:

配置中添加  spring.thymeleaf.prefix=classpath:/templates

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章