首页 > 代码库 > Error creating bean with name 'menuController': Injection of autowired dependency……

Error creating bean with name 'menuController': Injection of autowired dependency……

出现了一大串错误

Error creating bean with name 'userController': Injection of autowired dependencies failed。。。。。 


查了代码后发现,原来是在UserServiceImpl中忘了写一句话@Service("userService"),以至于因此导致一系列错误。


在控制层调用业务层,必须在业务层先进行注解:

@Service("userService");

然后在控制层注入业务层:

@Resource
private IUserService userService;


Error creating bean with name 'menuController': Injection of autowired dependency……