You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "igarashitm (via GitHub)" <gi...@apache.org> on 2023/09/19 10:34:25 UTC

[GitHub] [camel] igarashitm commented on pull request #11457: CAMEL-19846: yaml and xml DSL - Add support for BeanLoader so they ca…

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

   @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
   
   3. 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
   
   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-unsubscribe@camel.apache.org

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