In my mule application I defined some properties in mule-app.properties file, so I can change it "on the fly" on CloudHub.
Deploying on CloudHub all is right, and to get the properties on java class I used:
System.getProperty("propertyName")
.
Now my problem is that deploying the application on mule standalone, when It tries to use a property in a java class it returns null
even if on xml file I can use properties with the usual ${propertyName}
.
Is there any other way to access these properties from a java class?
Cloudhub properties are set using System Properties, thats why you can access them via System.getProperty().
mule-app.properties is special as this properties file automatically gets loaded into the Mule registry so you could access it via the Mule Context. But it would be better to inject them into you Java class from your Mule config: