WebApplicationContext context = ContextLoader.getCurrentWebApplicationContext();
IControlService controlService= (IControlService) context.getBean("controlService");
直接用这两行代码,已测可用
WebApplicationContext context = ContextLoader.getCurrentWebApplicationContext();
IControlService controlService= (IControlService) context.getBean("controlService");
直接用这两行代码,已测可用