You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/02/18 20:54:40 UTC

[jira] Commented: (CAMEL-2358) packageScan should support Spring property placeholders

    [ https://issues.apache.org/activemq/browse/CAMEL-2358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57676#action_57676 ] 

Claus Ibsen commented on CAMEL-2358:
------------------------------------

We can get this supported with the new Camel properties component

> packageScan should support Spring property placeholders
> -------------------------------------------------------
>
>                 Key: CAMEL-2358
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2358
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.1.0
>            Reporter: Johan Haleby
>             Fix For: 2.3.0
>
>
> 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.