You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by GitBox <gi...@apache.org> on 2019/08/20 08:34:42 UTC
[GitHub] [camel-quarkus] lburgazzoli commented on issue #147: Initialization
ordering
lburgazzoli commented on issue #147: Initialization ordering
URL: https://github.com/apache/camel-quarkus/issues/147#issuecomment-522913914
With PR https://github.com/apache/camel-quarkus/pull/148 I've added basic support for defining object to be bound to the camel context so you can do something like:
```java
@Recorder
public class SupportRecorder {
CamelRegistryBuildItem logComponent() {
DefaultExchangeFormatter def = new DefaultExchangeFormatter();
def.setShowAll(true);
def.setMultiline(true);
LogComponent component = new LogComponent();
component.setExchangeFormatter(def);
return new CamelRegistryBuildItem(
"log",
LogComponent.class,
component
);
}
}
```
```java
public class SupportBuildStep {
@Record(ExecutionTime.STATIC_INIT)
@BuildStep
CamelRegistryBuildItem logComponent(SupportRecorder recorder) {
return recorder.logComponent();
}
}
```
And the pre-configured log component will be put in camel registry.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services