使用SpringContextHolder获取bean实例

public static IConstantFactory me(){
    return SpringContextHolder.getBean(beanName:"constantFactory");
}

private static Constants constants = SpringContextHolder.getBean(Constants.class);

 

posted @ 2018-12-13 22:22  kangjie  阅读(1840)  评论(0编辑  收藏  举报