1. 程式人生 > >spring啟動時自動載入方法

spring啟動時自動載入方法

@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();
	}
}