Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Wed Dec 14 16:35:25 CST 2016
There was an unexpected error (type=Not Found, status=404).
No message available

原因是【Application启动类放的位置不对】要将Application放在最外层,也就是要包含所有子包。

如下图

controller扫包报错问题

访问不到方法首先要从你的controller能否被扫描到出发,

图中显示创建springboot项目自带的这两个的文件要注意把他俩拿出来放到父包下面也就是图中这个位置。如果你的这两个文件在子包里或者说平级的一个包里就会影响controller无法被扫描到,从而导致无法访问到你的方法



相关文章:

  • 2021-08-09
  • 2021-10-31
  • 2021-06-01
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2021-10-11
  • 2021-09-12
  • 2021-11-04
  • 2021-07-13
  • 2021-08-25
相关资源
相似解决方案