[
https://issues.apache.org/jira/browse/CAMEL-10031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15393706#comment-15393706
]
Claus Ibsen commented on CAMEL-10031:
-------------------------------------
Nicola
This is good findings. I also looked into this when I did the component /
data-format. I was looking for a way of allowing to use a wildcard in the
spring boot auto configuration so end users have freedom to create more beans
as named beans (I think Spring uses @Qualifier instead of @Named).
I think we should get in touch with Spring Boot folks and see what they say. It
would be nice if you could define in the prefix
https://github.com/apache/camel/blob/master/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentConfiguration.java#L31
A wildcard such as an asterix
{code}
@ConfigurationProperties(prefix = "camel.endpoint.ahc.*")
{code}
or maybe inspired by REST bindings using {foo}
{code}
@ConfigurationProperties(prefix = "camel.endpoint.ahc.{endpoint-id}")
{code}
And then some way to bind to a parameter in the auto configuration class
https://github.com/apache/camel/blob/master/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/springboot/AhcComponentAutoConfiguration.java#L40
{code}
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean("{endpoint-id}")
public AhcEndpoint configureAhcEndpoint(CamelContext camelContext,
AhcEndpointConfiguration configuration, String endpointId) throws
Exception
{code}
> camel-spring-boot - Add endpoint options as type-safe configuration properties
> ------------------------------------------------------------------------------
>
> Key: CAMEL-10031
> URL: https://issues.apache.org/jira/browse/CAMEL-10031
> Project: Camel
> Issue Type: New Feature
> Components: camel-spring-boot
> Reporter: Claus Ibsen
>
> See CAMEL-9419.
> We can now configure this for all the components. But for endpoints its a bit
> more as you can have many endpoints with different configuration.
> So either you assign an id to the endpoint you configure, and then need to
> refer to the endpoint by id, in the camel routes. Or we figure out something
> else.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)