1
속성 파일에서 시간 지연을 읽으려고합니다.낙타 상수 읽기 속성 파일
time_inMilis=15000
내가 할 내 낙타 컨텍스트 XML을 구성한 :
은 내 속성 파일에 정의<bean id="property" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:/D:/Develop/resources/my.properties
</value>
</property>
</bean>
<camel:camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<propertyPlaceholder id="properties" location="file:/D:/Develop/resources/my.properties"/>
<camel:route id="delayQueue">
<camel:from uri="seda:queue1" />
<delay asyncDelayed="true">
<constant>${time_inMilis}</constant>
</delay>
<camel:to uri="seda:queue2" />
</camel:route>
</camel:camelContext>
낙타가 어떤 오류가 발생하지 않지만 $ {time_inMilis을 무시 보인다 } 내 지연 시간을 0으로 설정하십시오.
내 속성 파일에서 지연 상수를 읽는 올바른 방법은 무엇입니까?
대단히 감사합니다! 잘 작동합니다. – lshaked
답변이 유용 할 경우 투표하십시오 – Seego