53.9. 配置组件并启用身份验证
对于使用 Box 进行身份验证,请在组件上设置身份验证属性,如下例所示:
BoxConfiguration configuration = new BoxConfiguration();
configuration.setClientId("clientId");
configuration.setClientSecret("clientSecret");
configuration.setUserName("userName");
configuration.setUserPassword("userPassword");
// add BoxComponent to Camel context
BoxComponent component = new BoxComponent(context);
component.setConfiguration(configuration);
context.addComponent("box", component);