lburgazzoli commented on a change in pull request #358: Fix #136 
@ConfigProperty and @Inject do not work in RouteBuilders
URL: https://github.com/apache/camel-quarkus/pull/358#discussion_r344565753
 
 

 ##########
 File path: 
extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java
 ##########
 @@ -232,7 +228,6 @@ CamelMainBuildItem main(
                 CamelContextBuildItem context,
                 CamelRoutesCollectorBuildItem routesCollector,
                 List<CamelMainListenerBuildItem> listeners,
-                List<CamelRoutesBuilderBuildItem> routesBuilders,
 
 Review comment:
   Camel has the ability to do class-path scanning to discover routes which can 
be activated by configuring which packages camel has to scan for 
`RoutesBuilder` classes (already supported by other platform such as Spring, 
CDI, Main) so we can mimic that behaviour at build time with a 
`quarkus.camel.*` option (note that this can activated also right now through 
camel main properties but class path scanning would happen at runtime).
   
   By doing that, routes builders can be added to the context by:
   - producing a `CamelBeanBuildItem`
   - using a `MainListener`
   - using an injected `CamelContext`
   - using a CDI annotation such as `@ApplicationScoped`
   - listing the packages to scan for auto discovery (as far as I remember 
discovered routes have lower precedence than those available from the container 
thus discarded if the same route class is also provided by the container)
   
   An additional option that has been discussed would be to leverage camel's 
annotation `@BindToRegistry` which would act like a cross platform lite DI.
   
   

----------------------------------------------------------------
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