반응형 xml 변환1 [JAVA] 자바 객체를 XML로 변환하기 - JAXB(자바API)를 사용하여 dto를 xml로 변환 (marshaller) 데이터를 주고 받을 때, 주로 json 형태를 사용하지만 가끔 xml을 사용하는 경우도 있어서, JAXB (자바API)를 이용하여 자바 객체를 xml 형태로 변경해주는 방법에 대해 알아보자. XmlRootElement : XML의 root Element명 XmlElement : XML의 각 root 하위 Element 명 # root dto 만들기 import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlAcce.. 2023. 6. 23. 이전 1 다음 반응형