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

一、错误提示报错图

解决方案:

1、方法一:Application启动类需要在最外面,包含所有子包。
项目结构
2、方法二:在启动类中添加@SpringBootApplication(scanBasePackages=“com.example.chart2.controller”)scanBasePackages=“你controller所在的包路径”
3、方法三:controller中访问路径问题
@RequestMapping(“xxxxxxxxx”) ,需要仔细检查自己的路径问题。

猜你喜欢

转载自blog.csdn.net/sunxiaohong__/article/details/125290433