springboot 报错Field XXX required a bean of type XXX that could not be found.

来源:互联网 发布:java开源人才网 编辑:程序博客网 时间:2024/05/21 11:01

例如:

Description:Field menuService in com.goodidea.sso.controller.MenuController required a bean of type 'com.goodidea.sso.service.MenuService' that could not be found.Action:Consider defining a bean of type 'com.goodidea.sso.service.MenuService' in your configuration.

在代码service上缺少相应的注解,像这样补充完注解即可

@Servicepublic class MenuServiceImpl implements MenuService 
阅读全文
0 0