You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/06/03 11:45:43 UTC

svn commit: r950925 - in /camel/trunk/components/camel-spring/src: main/java/org/apache/camel/spring/ test/java/org/apache/camel/spring/issues/componentscan/ test/java/org/apache/camel/spring/issues/componentscan2/ test/resources/ test/resources/org/ap...

Author: davsclaus
Date: Thu Jun  3 09:45:42 2010
New Revision: 950925

URL: http://svn.apache.org/viewvc?rev=950925&view=rev
Log:
CAMEL-2787: Using <package> scan now detcts @Component annotated RouteBuilder and includes them as well.

Added:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/MyRoute.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/MyOtherRoute.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.java   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan/
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.xml
      - copied, changed from r950883, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml   (with props)
Modified:
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java
    camel/trunk/components/camel-spring/src/test/resources/log4j.properties
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java?rev=950925&r1=950924&r2=950925&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java (original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/RouteBuilderFinder.java Thu Jun  3 09:45:42 2010
@@ -22,9 +22,14 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spi.PackageScanClassResolver;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.config.BeanPostProcessor;
 import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Component;
 
 /**
  * A helper class which will find all {@link org.apache.camel.builder.RouteBuilder} instances on the classpath
@@ -32,6 +37,7 @@ import org.springframework.context.Appli
  * @version $Revision$
  */
 public class RouteBuilderFinder {
+    private static final transient Log LOG = LogFactory.getLog(RouteBuilderFinder.class);
     private final SpringCamelContext camelContext;
     private final String[] packages;
     private PackageScanClassResolver resolver;
@@ -55,22 +61,87 @@ public class RouteBuilderFinder {
     public void appendBuilders(List<RoutesBuilder> list) throws IllegalAccessException, InstantiationException {
         Set<Class<?>> classes = resolver.findImplementations(RoutesBuilder.class, packages);
         for (Class aClass : classes) {
+            if (LOG.isTraceEnabled()) {
+                LOG.trace("Found RouteBuilder class: " + aClass);
+            }
+
+            // check whether the class has already been instantiate by Spring as it was @Component annotated
+            // and its already enlisted in the Spring registry
+            RouteBuilder existing = isRouteBuilderAlreadyRegisteredByComponentAnnotation(aClass);
+            if (existing != null) {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Adding existing @Component annotated RouteBuilder: " + aClass);
+                }
+                list.add(existing);
+                continue;
+            }
+            // certain beans should be ignored
             if (shouldIgnoreBean(aClass)) {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Ignoring RouteBuilder class: " + aClass);
+                }
                 continue;
             }
-            if (isValidClass(aClass)) {
-                RoutesBuilder builder = instantiateBuilder(aClass);
-                if (beanPostProcessor != null) {
-                    // Inject the annotated resource
-                    beanPostProcessor.postProcessBeforeInitialization(builder, builder.toString());
+
+            if (!isValidClass(aClass)) {
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Ignoring invalid RouteBuilder class: " + aClass);
+                }
+                continue;
+            }
+
+            // type is valid so create and instantiate the builder
+            RoutesBuilder builder = instantiateBuilder(aClass);
+            if (beanPostProcessor != null) {
+                // Inject the annotated resource
+                beanPostProcessor.postProcessBeforeInitialization(builder, builder.toString());
+            }
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Adding instantiated RouteBuilder: " + builder);
+            }
+            list.add(builder);
+        }
+    }
+
+    /**
+     * Lookup if the given class has already been enlisted in Spring registry since the class
+     * has been @Component annotated.
+     * 
+     * @param type  the class type
+     * @return the existing route builder instance, or <tt>null</tt> if none existed
+     */
+    protected RouteBuilder isRouteBuilderAlreadyRegisteredByComponentAnnotation(Class<?> type) {
+        Component ann = type.getAnnotation(Component.class);
+        if (ann != null) {
+            String id = ann.value();
+            if (ObjectHelper.isEmpty(id)) {
+                // no explicit id set, so Spring auto assigns the id, so lets try to find that id then
+                String[] names = applicationContext.getBeanNamesForType(type, true, true);
+                if (names != null && names.length == 1) {
+                    id = names[0];
+                }
+            }
+            if (ObjectHelper.isNotEmpty(id)) {
+                boolean match = applicationContext.isTypeMatch(id, type);
+                if (LOG.isTraceEnabled()) {
+                    LOG.trace("Is there already a RouteBuilder registering in Spring with id " + id + ": " + match);
+                }
+                if (match) {
+                    Object existing = applicationContext.getBean(id, type);
+                    if (existing instanceof RouteBuilder) {
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("Found existing @Component annotated RouteBuilder with id " + id);
+                        }
+                        return RouteBuilder.class.cast(existing);
+                    }
                 }
-                list.add(builder);
             }
         }
+        return null;
     }
 
     /**
-     * Lets ignore beans that are not explicitly configured in the spring.xml
+     * Lets ignore beans that are explicitly configured in the Spring XML files
      */
     protected boolean shouldIgnoreBean(Class<?> type) {
         Map beans = applicationContext.getBeansOfType(type, true, true);

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/MyRoute.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/MyRoute.java?rev=950925&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/MyRoute.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/MyRoute.java Thu Jun  3 09:45:42 2010
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.issues.componentscan;
+
+import org.apache.camel.spring.SpringRouteBuilder;
+import org.springframework.stereotype.Component;
+
+/**
+ * @version $Revision$
+ */
+@Component
+public class MyRoute extends SpringRouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start").to("mock:result");
+    }
+}

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/MyRoute.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/MyRoute.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.java?rev=950925&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.java Thu Jun  3 09:45:42 2010
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.issues.componentscan;
+
+import org.apache.camel.spring.SpringTestSupport;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringRouteIsComponentAnnotatedTest extends SpringTestSupport {
+
+    @Override
+    protected AbstractXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.xml");
+    }
+
+    public void testSpringRouteIsComponentAnnotated() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/MyOtherRoute.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/MyOtherRoute.java?rev=950925&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/MyOtherRoute.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/MyOtherRoute.java Thu Jun  3 09:45:42 2010
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.issues.componentscan2;
+
+import org.apache.camel.spring.SpringRouteBuilder;
+import org.springframework.stereotype.Component;
+
+/**
+ * @version $Revision$
+ */
+@Component("coolRoute")
+public class MyOtherRoute extends SpringRouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start").to("mock:result");
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/MyOtherRoute.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/MyOtherRoute.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.java?rev=950925&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.java Thu Jun  3 09:45:42 2010
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.issues.componentscan2;
+
+import org.apache.camel.spring.SpringTestSupport;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision$
+ */
+public class SpringRouteIsComponentAnnotated2Test extends SpringTestSupport {
+
+    @Override
+    protected AbstractXmlApplicationContext createApplicationContext() {
+        return new ClassPathXmlApplicationContext("org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml");
+    }
+
+    public void testSpringRouteIsComponentAnnotated() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/components/camel-spring/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/log4j.properties?rev=950925&r1=950924&r2=950925&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/log4j.properties (original)
+++ camel/trunk/components/camel-spring/src/test/resources/log4j.properties Thu Jun  3 09:45:42 2010
@@ -26,6 +26,7 @@ log4j.logger.org.apache.camel.management
 log4j.logger.org.apache.camel.impl.DefaultPackageScanClassResolver=WARN
 
 #log4j.logger.org.apache.camel=DEBUG
+#log4j.logger.org.apache.camel.spring=DEBUG
 #log4j.logger.org.apache.camel.component.mock=DEBUG
 #log4j.logger.org.apache.camel.spring.spi=DEBUG
 

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml?rev=950925&r1=950924&r2=950925&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml Thu Jun  3 09:45:42 2010
@@ -26,6 +26,7 @@
         <packageScan>
             <package>org.apache.camel.spring.issues</package>
             <excludes>**/*MyInjectionRouteBuilder*</excludes>
+            <excludes>*componentscan*</excludes>
         </packageScan>
     </camelContext>
 

Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.xml (from r950883, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml&r1=950883&r2=950925&rev=950925&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/SpringPackageTest.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan/SpringRouteIsComponentAnnotatedTest.xml Thu Jun  3 09:45:42 2010
@@ -17,16 +17,21 @@
 -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
 
+    <!-- START SNIPPET: e1 -->
+    <!-- enable Spring @Component scan -->
+    <context:component-scan base-package="org.apache.camel.spring.issues.componentscan"/>
+
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
-        <packageScan>
-            <package>org.apache.camel.spring.issues</package>
-            <excludes>**/*MyInjectionRouteBuilder*</excludes>
-        </packageScan>
+        <!-- and then let Camel find the route builders as well -->
+        <package>org.apache.camel.spring.issues.componentscan</package>
     </camelContext>
+    <!-- END SNIPPET: e1 -->
 
 </beans>

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml?rev=950925&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml Thu Jun  3 09:45:42 2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+    <!-- enable Spring @Component scan -->
+    <context:component-scan base-package="org.apache.camel.spring.issues.componentscan2"/>
+
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <!-- and then let Camel find the route builders as well -->
+        <package>org.apache.camel.spring.issues.componentscan2</package>
+    </camelContext>
+
+</beans>

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/componentscan2/SpringRouteIsComponentAnnotated2Test.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml