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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to