Read Properties In Mule 4
You can use p function of dataweave to retrieve the value of the properties defined in properties file which can be secure or unsecured. Let’s see how we can Read Properties In Mule 4
Example
Sample.properties
user=admin http.host=google.com
SecureSample.properties
http.port=![s3bVCSmH8KI=]
Dataweave code
%dw 2.0 output application/json --- { "Host":p('http.host'), "Port":p('secure::http.port') }
Result:
{ "Host": "google.com", "Port": "8081" }
More on add secure properties in mule application – Adding Secure Property plugin or editor
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.
Very helpful succinct guide