WebApplicationContext ctx=ContextLoader.getCurrentWebApplicationContext(); ctx.getBean("xxxxService");