简体   繁体   中英

reading properties file from mule server location

I have configuration file as

 <db:oracle-config name="Oracle" host="${db.host}" port="${db.port}" instance="${db.instance}" user="${db.user}" password="${db.password}" doc:name="Oracle"/>
<http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${glport}" doc:name="HTTP" path="url1">

Reading all these properties from the mule-app.properties file, which is working fine.

Now the support team in production requires the content of the properties should be read from server location and not the mule-app.properties. The location of the properties is {mule-server-location}/mydir/app.properties.

1) Is it possible to read the properties file from this location?

2) If not, how can I read some content of the file from the conf directory which is located in {mule-server-location}

I have gone the documents here , it says to use spring context properties place holder, but when i start the local server filenotfound exception throws. In my studio, where do I keep app.properties file?

This is a very simple requirement. You can use property placeholder to meet your requirement.

A sample XML is shown below.

<context:property-placeholder location="file:${mule_home}/conf/myresource.properties"/>

You can also specify multiple files using a comma separator.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM