标签:
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); EmployeeService es = wac.getBean(EmployeeServiceImpl.class);
WebApplicationContext 获取项目中的bean
标签:
原文地址:http://www.cnblogs.com/shell-blog/p/5344265.html