camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johan Haleby (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAMEL-2358) packageScan should support Spring property placeholders
Date Wed, 13 Jan 2010 18:45:44 GMT
packageScan should support Spring property placeholders
-------------------------------------------------------

                 Key: CAMEL-2358
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2358
             Project: Apache Camel
          Issue Type: Improvement
            Reporter: Johan Haleby


Right now you cannot use Spring property placeholders to define a packageScan inside the Camel
XML. I.e. this won't work:
{code:xml}
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
    ">

  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
          <packageScan>
                  <package>${some.scan.path}</package>
          </packageScan>
  </camelContext>
</beans>
{code}

However a workaround exists for uri's as seen in the [FAQ|http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html].
I'd like to propose something similar for packageScan. For example something like this:
{code:xml}
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
    ">

  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

  <camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
     <package id="scanPath1" name="${some.scan.path}"/>
     <packageScan>
         <package ref="scanPath1" />
      </packageScan>
  </camelContext>

</beans>
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message