Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.3, 2.9.0
-
None
-
Unknown
Description
We should skip anonymous RouteBuilder classes. For example if people add routes from an unit test, just to have a special route in the test method. You may get package scan issues, such as
Tests in error: testCamelRoute(foo.CamelContextXmlTest): Error creating bean with name 'template': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel-1': Invocation of init method failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'foo.CamelContextXmlTest$1': Unsatisfied dependency expressed through constructor argument with index 0 of type [foo.CamelContextXmlTest]: : No matching bean of type [foo.CamelContextXmlTest] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [foo.CamelContextXmlTest] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}