项目背景:springboot+thymeleaf
本地运行正常,打包部署服务器后访问页面500错误
接口正常
报错页面如下:
Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Mon Jan 13 18:58:14 CST There was an unexpected error (type=Internal Server Error, status=500).Error resolving template [/web/plant/index], template might not exist or might not be accessible by any of the configured Template Resolvers
解决方法:
把"/"去掉
错误:@RequestMapping("/web/main")错误:return "/web/index";正确:@RequestMapping("web/main")正确:return "web/index";