Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以轻松地将消息发送到在 a 中定义的多个端点List<String>?
List<String>
例如,我想做:
from("file://c:/inbox").to(myStringList);
是的,您需要将该列表转换为数组,如图所示。虽然在纯 Java 中这样做有点难看,如代码所示:
String[] s = myStringList.toArray(new String[myStringList.size()]); from("file://c:/inbox").to(s);