Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-4875

The package scan for RouteBuilder classes should not include anonymous inner classes

    XMLWordPrintableJSON

Details

    • 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: {}
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: