나는 아파치 낙타 청사진에서 스로틀을 사용한다 : 스로틀 timePeriodMillis = "1000" 상수 = 4 나는 placePeriod를 사용하여 timePeriodMillis의 값을 동적으로 넣고 싶다. 가능한가?Apache Camel : 스로틀 사용 : 설정 파일을 사용하여 timePeriodMillis 값을 변경하는 방법은 무엇입니까?
-1
A
답변
0
문서를 참조하십시오 : http://camel.apache.org/using-propertyplaceholder.html
그리고 XML의 DSL의 특성의 어떤 종류의 속성 자리 표시를 사용하여 섹션 을
0
구성 요소가 여기에 사용할 수있는 속성
예 :
Properties properties = new Properties();
InputStream input = null;
public void configure() throws IOException {
CamelContext context = new DefaultCamelContext();
input = new FileInputStream("sample.properties");
properties.load(input);
System.out.println("CITY IS" +properties.getProperty("wl.city"));
String city = properties.getProperty("wl.city");