프로그램을 만들다 보면 VO 객체를 복사할 경우가 많이 생기게 된다.
3~4개 정도
그럴 경우 Spring FameWork 에서 포함되어 있는.
BeanUtil.copyProperty("sourceVO", "targetVO')
으로 사용하면 된다.
주의할 점.)
BeanUtils 는 apache Jakarta Project 로 apache.commons.beanUtils 은 copyProperty("tartget", "source")
이다.
Spring에서 포함 되면서 가공되어진 것으로 보인다. API 필히 확인. ㅋ
출처: http://srue.tistory.com/62 [Srue Story.]
'개발 > JAVA' 카테고리의 다른 글
[Java] Byte Reverse (0) | 2023.04.20 |
---|---|
myBatis selectone null 처리 (0) | 2017.11.21 |
java 인코딩 깨질때 [한글 인코딩 오류] 체크 (0) | 2017.07.21 |
Java split 사용법 (0) | 2017.04.05 |
eclipse에서 대소문자 단축키 세로영역 드래드 방법 (0) | 2017.03.27 |