• jsp获取spring容器
<%

ServletContext sc = this.getServletConfig().getServletContext();
ApplicationContext ac2 = WebApplicationContextUtils.getWebApplicationContext(sc);

RedisService redisService=(RedisService)ac2.getBean("redisService");

%>
  • service demo

@Service("redisService")


张泽
5 声望1 粉丝