티스토리 뷰

Skill/spring

ServiceInit.java

진열사랑 2025. 1. 13. 10:28

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

'Skill > spring' 카테고리의 다른 글

SMTPConfig.java  (0) 2025.01.13
ServiceInitializer.java  (0) 2025.01.13
ServiceConfig.java  (0) 2025.01.13
ServiceAOP.java  (0) 2025.01.13
RedisConfig.java  (0) 2025.01.13
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함