Error creating bean with name 'roleServiceImpl': Injection of autowired dependencies failed;

转载原作者:http://blog.csdn.net/gisredevelopment/article/details/37695713

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


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

[java]  view plain  copy
  1. @Service("userService");  

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

[java]  view plain  copy
  1. @Resource  
  2. private IUserService userService;  

猜你喜欢

转载自blog.csdn.net/qq389203946/article/details/79065258