You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Zoran Regvart (JIRA)" <ji...@apache.org> on 2018/07/25 19:13:00 UTC
[jira] [Resolved] (CAMEL-12682) Custom ApplicationContextRegistry
extension NOT discovered
[ https://issues.apache.org/jira/browse/CAMEL-12682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zoran Regvart resolved CAMEL-12682.
-----------------------------------
Resolution: Implemented
Fix Version/s: 2.23.0
Support for Spring beans of type {{Registry}} to be present in the \{{ApplicationContext} and replace the default {{ApplicationContextRegistry}} was added to master.
Multiple {{Registry}} implementations can be present in the {{ApplicationContext}} and order preference can be expressed with standard Spring {{Ordered}} contract.
This allows having a custom {{Registry}} and {{ApplicationContextRegistry}} in the same {{ApplicationContext}} if needed.
> Custom ApplicationContextRegistry extension NOT discovered
> ----------------------------------------------------------
>
> Key: CAMEL-12682
> URL: https://issues.apache.org/jira/browse/CAMEL-12682
> Project: Camel
> Issue Type: Improvement
> Components: camel-spring
> Affects Versions: 2.21.1
> Reporter: Christian Ribeaud
> Assignee: Zoran Regvart
> Priority: Minor
> Fix For: 2.23.0
>
>
> Up to this documentation [page|http://camel.apache.org/advanced-configuration-of-camelcontext-using-spring.html], I got the impression that following code snippet:
> {code:java}
> @Bean
> public static Registry createMyApplicationContextRegistry(ApplicationContext applicationContext) {
> return new MyApplicationContextRegistry(applicationContext);
> }
> {code}
> in my *Spring* {{Application.java}} startup class should override the default {{ApplicationContextRegistry}} used.
> This does NOT work in my case. What works is annotating (with {{@Bean}}) my custom {{SpringCamelContext}} extension, which then overrides the {{createRegistry}} method.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)