public static IConstantFactory me(){ return SpringContextHolder.getBean(beanName:"constantFactory"); }private static Constants constants = SpringContextHolder.getBean(Constants.class);
使用SpringContextHolder获取bean实例
原文:https://www.cnblogs.com/taiguyiba/p/10116865.html