使用springboot访问jsp,页面出现这样的错误:
This application has no explicit mapping for /error, so you are seeing this as a fallback.
There was an unexpected error (type=Not Found, status=404).
No message available
查资料显示,是因为App的位置没有放对导致的,spring-boot会自动加载启动类所在包下及其子包下的所有组件.
before:

after:

问题解决!
本文解决了一个常见的SpringBoot应用中访问JSP页面出现404错误的问题,原因是启动类所在包及其子包下的组件未正确加载。
5万+

被折叠的 条评论
为什么被折叠?



