- jsp 获取 spring 容器
<%
ServletContext sc = this.getServletConfig().getServletContext();
ApplicationContext ac2 = WebApplicationContextUtils.getWebApplicationContext(sc);
RedisService redisService=(RedisService)ac2.getBean("redisService");
%>
- service demo
@Service(“redisService”)