在Servlet中使用Spring

要添加org.springframework.web-3.x.x.RELEASE.jar

ServletContext application;
WebApplicationContext wac;
application = getServletContext();
wac = WebApplicationContextUtils.getWebApplicationContext(application);
wac.getBean("...");

Comments are closed.