spring啟動時自動載入方法
阿新 • • 發佈:2018-12-27
@Component @Lazy(value=false) public class LoadConfigDataEngine { @PostConstruct public void init(){ System.out.println("############LoadConfigDataEngineInit#############"); // BUSINESS_D_MANAGE_SERVER__WITHDRAW_PAY_WATER_HEADER = dictionaryItemService_db.selectDictionaryVal(); // System.out.println("**********************************載入提現字首:"+BUSINESS_D_MANAGE_SERVER__WITHDRAW_PAY_WATER_HEADER); loadDictionary();//載入資料字典資料資訊 loadParameter();//載入引數配置資料資訊 // testMemcacheData();//測試 } @PreDestroy public void destroy(){ System.out.println("############LoadConfigDataEngineDestroy#############"); SpyMemcachedUtil.getInstance().disConnect(); } }