普通类调用service

网上找的各种注解方式都无效,最后只能用spring上下文获取接口类如下:

ApplicationContext context = ContextLoader.getCurrentWebApplicationContext();
IBaseQueryBS iBaseQueryBS = context.getBean(IBaseQueryBS.class);

猜你喜欢

转载自www.cnblogs.com/zhangdke/p/11816987.html