SpringBoot打开 localhost:8080/......时异常:异常:This application has no explicit mapping for /error, so you are seeing this as a fallback.

1.Application启动类的位置不对.要将Application类放在最外侧,即包含所有子包 
原因:spring-boot会自动加载启动类所在包下及其子包下的所有组件.

2.控制器的URL路径书写问题 
@RequestMapping(“xxxxxxxxxxxxxx”) 
实际访问的路径与”xxx”不符合.

posted @ 2018-12-02 13:28  dbSyk  阅读(468)  评论(0)    收藏  举报