import org.springframework.web.context.WebApplicationContext;import org.springframework.web.context.support.WebApplicationContextUtils; WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); EmployeeService es = wac.getBean(EmployeeServiceImpl.class);
时间: 2024-10-29 00:05:49