我在apache駱駝藍圖中使用油門:throttle timePeriodMillis =「1000」 with constant = 4 我想使用佔位符動態地放置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");