[ 
https://issues.apache.org/jira/browse/CAMEL-21034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17871010#comment-17871010
 ] 

Claus Ibsen commented on CAMEL-21034:
-------------------------------------

Ah okay, yeah we should make sure spring always sets the injector to spring 
based if its the default already

> DefaultInjector created instead of SpringInjector when using custom 
> ModelReifierFactory in Spring Boot app
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-21034
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21034
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core, camel-spring-boot
>    Affects Versions: 4.6.0
>         Environment: Spring Boot
>            Reporter: Claude Mamo
>            Priority: Minor
>         Attachments: call-stack.txt
>
>
> I'm referencing a custom model reifier factory in 
> _META-INF/services/org/apache/camel/model-reifier-factory_ which is causing 
> DefaultInjector to be used instead of the expected SpringInjector. 
> SpringCamelContext creates the injector when loading a custom 
> ModelReifierFactory. SpringInjector requires the application context, but 
> since the application context hasn't yet been set on SpringCamelContext, the 
> SpringInjector cannot be created so SpringCamelContext falls back to 
> DefaultInjector.  I've attached the call stack of this behaviour.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to