本地测试的时候是没有问题的,但是放到服务器上缺出现问题了,报:
Error resolving template [/index.html], template might not exist or might not be accessible by any of the configured Template Resolvers
1、可能配置存在问题,比如thymeleaf
spring: thymeleaf: cache: false prefix: classpath:/templates/ mode: HTML encoding: UTF-8 suffix: .html
2、可能是存在 “/” 的问题,可以把"/" 去掉试试,比如我跳转是/index.html 页面,则:
变成