首页 > TAG信息列表 > switchConfig

工具类中采用静态注入的方式来注入bean

方式一: @Component public class CommonUtils { private static SwitchConfig switchConfig; @Autowired public void setSwitchConfig(SwitchConfig switchConfig) { CommonUtils.switchConfig = switchConfig; } /*** * *工