Passing values as system properties when WSO2 servers start
1 min readNov 24, 2018
- Here I am trying to pass a value as a system property when the server is starting. I pass this property as system.property. I added it to integrator.sh file as below.
-Dsystem.property=””\
- And I start the WSO2 server passing the property as below.
./integrator.sh -Dsystem.property="TestValue"
- Following is the sample API of WSO2 ESB which I used to log the passed system property.
<api xmlns="http://ws.apache.org/ns/synapse" name="Test" context="/test">
<resource methods="GET">
<inSequence>
<log level="custom">
<property name="System_Property" expression="get-property('system', 'system.property')"/>
</log>
<respond/>
</inSequence>
<outSequence/>
</resource>
</api>