57.4. 동적 클래스 이름을 사용하여 XML에서 POJO로의 분리
jackson을 사용하여 POJO에 대한marshal XML을 unmarshal으로 해제하는 경우, 이제 메시지에서 marshal을 해제할 클래스 이름을 나타내는 헤더를 지정할 수 있습니다.
해당 헤더에 해당 헤더가 메시지에 있는 경우 키 CamelJacksonUnmarshalType 이 있는 경우 jackson은 해당 헤더를 POJO 클래스의 FQN으로 사용하여 XML 페이로드를 로marshal합니다.
For JMS end users there is the JMSType header from the JMS spec that
indicates that also. To enable support for JMSType you would need to
turn that on, on the jackson data format as shown:
JacksonDataFormat format = new JacksonDataFormat();
format.setAllowJmsType(true);
또는 XML DSL에서 이를 다음과 같이 구성합니다.
<dataFormats>
<jacksonxml id="jacksonxml" allowJmsType="true"/>
</dataFormats>