davsclaus commented on PR #11457:
URL: https://github.com/apache/camel/pull/11457#issuecomment-1725259262

   > @davsclaus so what I learned from @grgrzybek is that this is already 
supported by:
   > 
   > 1. Register beans before DefaultConfigurationConfigurer searches
   >    
https://github.com/apache/camel/blob/main/dsl/camel-xml-io-dsl/src/main/java/org/apache/camel/dsl/xml/io/XmlRoutesBuilderLoader.java#L83-L102
   > 2. DefaultConfigurationConfigurer search in bean registry, if CamelContext 
related bean is found, use them
   >    
https://github.com/apache/camel/blob/main/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java#L894
   > 
   > It's already working for XML IO 
https://github.com/apache/camel-kamelets-examples/blob/main/jbang/app-routes-spring-beans/app.xml#L20-L22
   > 
   
   This is only when using spring-beans (eg real spring dependency injection). 
If you just have 100% camel xml files (routes and beans) then spring is NOT 
used at all, and this PR would be needed to have beans working for that - just 
like in YAML DSL.
   
   > So once YamlRoutesBuilderLoader#preParseRoute() supports loading beans 
into bean registry, this should work for YAML DSL as well.
   > 
   > @grgrzybek could you chime in if there's something to add?
   
   


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

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to