listener中获取redisTemplate

httpServerletListener中获取spring bean

public voidsessionCreated(HttpSessionEvent arg0) {

ApplicationContext ctx=WebApplicationContextUtils.getRequiredWebApplicationContext(arg0.getSession().getServletContext())

}

你可能感兴趣的:(listener中获取redisTemplate)