标签:col stc 操作 sdn cat struct 静态变量 tco 无法
参考:https://blog.csdn.net/BuquTianya/article/details/49009831
1.使用xml方式声明Bean,在xml中注入静态变量;
2.使用一个非静态的变量注入,然后在@PostConstruct标记的方法中给静态变量赋值。
3,在静态方法中获取bean
AppConfMapper appConfMapper = (AppConfMapper) BeanHoldFactory.getApplicationContext().getBean("appConfMapper");
4,给静态变量设置Setter方法,在Setter方法上加注入操作就可以了
标签:col stc 操作 sdn cat struct 静态变量 tco 无法
原文地址:https://www.cnblogs.com/wanhua-wu/p/9355199.html