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

This application has no explicit mapping for /error, so you are seeing this as a fallback.异常解决_第1张图片

1、出现这种错误一般都是,springboot启动类没有跟项目包平级

This application has no explicit mapping for /error, so you are seeing this as a fallback.异常解决_第2张图片

解决:把启动类移到跟项目包平级的文件中即可,然后重启项目

This application has no explicit mapping for /error, so you are seeing this as a fallback.异常解决_第3张图片

2、控制器的URL路径书写问题 

@RequestMapping(“/xxx”) 

实际访问的路径与"xxx"不符合。

This application has no explicit mapping for /error, so you are seeing this as a fallback.异常解决_第4张图片

This application has no explicit mapping for /error, so you are seeing this as a fallback.异常解决_第5张图片

你可能感兴趣的:(java,spring,boot,spring,mybatis)