@Component
public class ServiceInit implements InitializingBean {
@Autowired
@Qualifier("mainDB")
private GenericDAO<Object, Object> dao;
@Autowired
Property property;
@Override
public void afterPropertiesSet() throws Exception {
HashMap<String, Object> map = new HashMap<>();
map.put("location", Property.location);
map.put("bosTypeCode", Property.bosTypeCode);
map.put("serverDomain", Property.serverDomain);
System.out.println("++++++++++++++++++++InitializingBean++++++++++++++++++++++");
System.out.println("property : " + Property.location);
System.out.println("bosTypeCode : " + Property.bosTypeCode);
System.out.println("serverDomain : " + Property.serverDomain);
int updateCount = dao.update("common.updateServerDomain", map);
System.out.println("+++++++++++++++도메인정보 갱신+++++++++++++++");
System.out.println("++++++++++++++++++++InitializingBean++++++++++++++++++++++");
}
}