[
https://issues.apache.org/jira/browse/CAMEL-14806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-14806:
--------------------------------
Fix Version/s: 3.3.0
> Property camel.springboot.java-routes-exclude-pattern not working correctly
> ---------------------------------------------------------------------------
>
> Key: CAMEL-14806
> URL: https://issues.apache.org/jira/browse/CAMEL-14806
> Project: Camel
> Issue Type: Bug
> Components: camel-spring-boot
> Affects Versions: 3.1.0
> Reporter: Marcelo Nardelli
> Priority: Minor
> Fix For: 3.3.0
>
> Attachments: demo.zip
>
>
> Hi,
> I believe that the property camel.springboot.java-routes-exclude-pattern is
> not being applied correctly. Given two classes Route1 and Route2 (both
> annotated with spring boot's Component annotation) and the pattern
> "***/Route2**", I would expect to see only Route1 being picked up and
> started, but I see both routes being started when I run the application. It
> seems that only Route1 component can be excluded if the pattern matches that
> class.
>
> The reason for that seems to be in the class
> org.apache.camel.spring.boot.SpringBootRoutesCollector. It receives the
> exclude pattern as a parameter in the method collectRoutesFromRegistry, but
> at some point replaces it with the value of the property
> CamelTestSpringExcludeRoutes. The original pattern can only be matched
> against the first component route registered in spring boot Application
> Context.
>
> I have attached a sample application showing the situation. If I am
> misunderstanding something, please let me know.
>
> Thanks!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)