restful访问出现This application has no explicit mapping for /error, so you are seeing this as a fallback

项目中访问测试restful,http://localhost:8080/nes4/test出现如下错误

Whitelabel Error Page

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

如图

restful访问出现This application has no explicit mapping for /error, so you are seeing this as a fallback_第1张图片

解决:发现是springboot 注解未将controller扫描,添加扫描如下

 

restful访问出现This application has no explicit mapping for /error, so you are seeing this as a fallback_第2张图片

再次启动springboot,测试http://127.0.0.1:8080/test ,成功

restful访问出现This application has no explicit mapping for /error, so you are seeing this as a fallback_第3张图片

 

 

 

 

 

 

 

 

你可能感兴趣的:(问题,java后台,框架集成)