Stories

Detail Return Return

在jsp裏, 調用容器,使用sevice - Stories Detail

  • jsp獲取spring容器
<%

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

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

%>
  • service demo

@Service("redisService")

Add a new Comments

Some HTML is okay.