SpringContextHolder使用报SpringContextHolder使用报错:applicaitonContext属性未注入, 请在applicationContext.xml中定义SpringContextHolder错:applicaitonContext属性未注入, 请在applicationContext.xml中定义SpringContextHolder

 

 将 SpringContextHolder获取RedisUtil 实例改成,通过spring字段注入。使用@AutoConfigureAfter(RedisUtil.class)  AutoConfigureAfter:的作用是,让WorkflowListener的加载在 RedisUtil 之后。这样WorkflowListener加载的时候,RedisUtil 已经加载好了

 

posted @ 2021-09-30 12:08  爱摇头的封三  阅读(906)  评论(0编辑  收藏  举报