Hi,

I am using below config to read files from  specific directory.

<route id="readCTSFile" startupOrder="2" shutdownRoute="Defer">
                        <from
uri="file://dev/source/cts?delay=10000&amp;delete=false&amp;exclude=.done&amp;move=.done/${file:name.noext}-${date:now:yyyyMMddHHmmss}&amp;moveFailed=.error/${file:name.noext}-${date:now:yyyyMMddHHmmss}.error&amp;autoCreate=false"/>
<!--            <to
uri="flatpack:fixed:META-INF/flatpack/CTSFixedLength.pzmap.xml"/>-->
                        <unmarshal ref="flatPackRef"/>
                        <to uri="bean:mapCTStoBedBean?method=mapCTSLineToBed"/>
</route>
 <!--                                                                     
-->
 <!-- The will be the encryptor used for decrypting configuration values. 
-->
 <!--                                                                     
-->
 <bean id="configurationEncryptor"
     class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
   <property name="config" ref="environmentVariablesConfiguration" />
 </bean>

 <bean id="propertyConfigurer"
    
class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
   <constructor-arg ref="configurationEncryptor" />
   <property name="locations">
     <list>
       <!-- when java app starts, env value is passed from the program
arguments->
       <value>classpath:META-INF/properties/${env}.properties</value>
     </list>
   </property>
   
 </bean>


Now, I am trying to figure out based on environment where application was
deployed the directory will be changed i.e

dev/source/cts  -- dev environment
uat/source/cts -- uat environment.


The camel file component site clearly explains that "... the starting
directory must not contain dynamic expressions with ${ } placeholders."  I
am already using Spring placeholder feature and setting database connections
details from dev.properties or  uat.properties file. How can I get File
component to read environment properties file to get directory name?

Kind regards,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/File-Component-directory-name-changes-based-on-environment-location-tp2266342p2266342.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to