Spring 使用

一、工具类中使用bean

IService service = (IService)ContextLoader.getCurrentWebApplicationContext().getBean(serviceBeanName);
View Code
原文地址:https://www.cnblogs.com/jianxie/p/3793221.html