SpringContextHolder类
摘要:1、通常使用SpringContextHolder类获取bean实例: 解决: 如果要在静态方法中调用某一bean的方法,那么该bean必须声明为static的,但正常情况下@Autowired无法注入静态的bean,。 利用Spring的使用SpringContextHolder工具类的getBe
阅读全文
posted @ 2020-01-20 23:31
posted @ 2020-01-20 23:31