在Servlet中使用Spring

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

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

Leave a Reply

Your email address will not be published. Required fields are marked *

*