[
https://issues.apache.org/jira/browse/CAMEL-12087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470356#comment-16470356
]
Luca Burgazzoli commented on CAMEL-12087:
-----------------------------------------
There are some cases where a bean of type CamelContextAware needs to be
initialized before the camel context is configured, in particular this can
happen with spring boot auto-configuration ordering so i.e. you want to provide
a bean that CamelAutoConfiguration loads upon context configuration (such as
HealthCheckRepository).
In this case the camel post processor is not able to inject a camel context
instance so I'd propose to add an annotation like @LazyContextBinding which can
be used to instruct the post processor that it is ok not to inject a camel
context if it is not found.
[~davsclaus] make sense ?
> camel-core: WARN No CamelContext defined yet so cannot inject into bean
> -----------------------------------------------------------------------
>
> Key: CAMEL-12087
> URL: https://issues.apache.org/jira/browse/CAMEL-12087
> Project: Camel
> Issue Type: Bug
> Components: camel-spring-boot
> Reporter: Luca Burgazzoli
> Assignee: Luca Burgazzoli
> Priority: Minor
> Fix For: 2.20.4, 2.21.2
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)