2017-01-12 1 views
1

나는 내 ActiveMQ를 끝 지점을 통해 자바 POJO를 얻고으로이액세스 회원

<camelContext xmlns="http://camel.apache.org/schema/spring"> 
     <propertyPlaceholder id="properties" location="classpath:props.properties" /> 
     <route> 
      <from 
       uri="activemq:queue:adapter.queue?mapJmsMessage=false&amp;disableReplyTo=true" /> 
      <log message="This is a status request"></log> 
      <process ref="psuedoRoute"></process> 
     </route> 
</camelContext> 

과 같은 스프링 XML을 사용하여 내 경로를 기록하고있다 그것은 교환 체입니다. 이 경로 xml 자체 내에서 문자열 멤버의 값을 읽을 수 있습니까?

답변

0

예, 가능합니다. 당신은 SPEL을 사용할 수 있습니다, 당신은 자바 객체, getter 메서드를 호출 할 수 있습니다. 당신은 그것을 위해 SPEL 필요하지 않습니다

<camelContext xmlns="http://camel.apache.org/schema/spring"> 
     <propertyPlaceholder id="properties" location="classpath:props.properties" /> 
     <route> 
      <from 
       uri="activemq:queue:adapter.queue?mapJmsMessage=false&amp;disableReplyTo=true" /> 
      <log message="This is a status request"></log> 
      <process ref="psuedoRoute"></process> 
      <log message="This is a status request"></log> 
      <setBody> 
       <spel>#{body.getValue()}</spel> 
      </setBody> 
     </route> 
</camelContext> 
+0

: 같은

그것은있을 수 있습니다. 단순 언어도 그 트릭을 따라야합니다. ' $ {body.value}' – Ralf