这个错误怎么解决,服务有启动,部署在windows上。 在服务器上访问 http://127.0.0.1:8080/admin/index 。这个请求会跳去后台的首页。但报错:
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/inde
x], template might not exist or might not be accessible by any of the configured
Template Resolvers
.yml 配置是这样,这个有关系吗? 在本地开发是没问题的,但打包上去就报错
thymeleaf:
prefix: classpath:/templates/
suffix: .html
mode: LEGACYHTML5
encoding: UTF-8
servlet:
content-type: text/html
cache: false
check-template-location: true
templates_root: src/main/resources/templates/
controller 的return “/index” 改成 return "index";就好了