本文共 438 字,大约阅读时间需要 1 分钟。
1.比如使用Shiro时我们自定义了Realm,并在其中使用了
@Autowired private UserService userService;
2.现在修改为
@Autowired @Lazy private UserService userService;
即可,还有方法,比如ApplicationContextRegister.getBean()手动注入Bean。
转载地址:http://qngum.baihongyu.com/