Yeah that's something I was thinking about but then I ended up with
testing something different, do not know if it is the best way :)

So the camel-package-maven-plugin would generate:

- 
org.apache.camel.component.ehcache.springboot.EhcacheComponentAutoConfiguration
- org.apache.camel.component.ehcache.springboot.EhcacheComponentConfiguration
- org.apache.camel.component.ehcache.springboot.EhcacheComponentConfigurer
- org.apache.camel.component.ehcache.springboot.configurer.DefaultConfigurer

Then EhcacheComponentAutoConfiguration applies all the configurer
(type EhcacheComponentConfigurer) it can found to the EhcacheComponent
it is setting up and there will be at least one that is the
DefaultConfigurer that simply apply the properties from
EhcacheComponentConfiguration. The advantage of this method is that we
can use standard spring annotation to include/exclude configurer
without having to manually write all the conditions.

I've created a simple example here:
https://github.com/lburgazzoli/camel-ehcache-starter

---
Luca Burgazzoli


On Tue, May 16, 2017 at 11:19 PM, Zoran Regvart <zo...@regvart.com> wrote:
> Hi Luca,
>
> On Tue, May 16, 2017 at 6:23 PM, Luca Burgazzoli <lburgazz...@gmail.com> 
> wrote:
>> What would be the best option to keep the auto generation awesomeness
>> and at the same time have a way to tweak the process ?
>
> BeanDefinitionRegistryPostProcessor can remove and add bean
> definitions, so you can do pretty much anything you need.
>
> So perhaps a BeanDefinitionRegistryPostProcessor to load custom SPI to
> perform additional post processing of the bean definition registry,
> then have this BeanDefinitionRegistryPostProcessor and SPI interface
> in camel-spring-boot, and the implementation of the SPI in the
> component starter. The SPI implementation can be loaded using
> FactoryFinder.
>
> zoran
> --
> Zoran Regvart

Reply via email to