Copy to ClipboardCopied!Toggle word wrapToggle overflow
您还可以根据 Camel 上下文类型重新定义选择,例如:
@Any
@Inject
Instance<CamelContext> contexts;
// Refine the selection by type
Instance<DefaultCamelContext> context = contexts.select(DefaultCamelContext.class);
// Check if such a bean exists then retrieve a reference
if (!context.isUnsatisfied())
context.get();
@Any
@Inject
Instance<CamelContext> contexts;
// Refine the selection by type
Instance<DefaultCamelContext> context = contexts.select(DefaultCamelContext.class);
// Check if such a bean exists then retrieve a reference
if (!context.isUnsatisfied())
context.get();
Copy to ClipboardCopied!Toggle word wrapToggle overflow
甚至迭代特定的 Camel 上下文,例如:
@Any
@Inject
Instance<CamelContext> contexts;
for (CamelContext context : contexts)
context.setUseBreadcrumb(true);
@Any
@Inject
Instance<CamelContext> contexts;
for (CamelContext context : contexts)
context.setUseBreadcrumb(true);
Copy to ClipboardCopied!Toggle word wrapToggle overflow