Override property value
Spring Boot has many options to set or override applications properties. On startup, it loads properties from all places and saves them into PropertySource objects. Subsequently, PropertySource objects are ordered, and when a component tries to use a property value, Spring Boot starts searching it from the first PropertySource by priority. For more details, refer to Spring Boot application properties priority.
Also, the Spring Cloud Config ZooKeeper solution is used, and these properties are loaded to the system in the first turn.
According to the information below and the WorkSpace 2.0 configuration, you can add the following properties:
Properties that are set in ZooKeeper with a specific profile.
Properties that are set in ZooKeeper.
Java System properties added to the
JAVA_OPSvariable, which is set in the/bin/setenv.shTomcat file.OS environment variables.
The
worksapce.propertiesfile in the Tomcat/conffolder.The
application-{profile}.ymlfile inside thewar/jarfile.#application.yml properties spring: main: web-application-type: servlet --- # application-ws2.yml properties spring: profiles: ws2The
application.ymlfile inside thewar/jarfile, where you can set profile-specific properties.The default value in the Property Object annotated by
@ConfigurationPropertiesbootstrap.yml
note
bootstrap.yml has the least priority, but it is loaded at the Bootstrap phase where only Java System properties, OS environment variables, and bootstrap.yml are loaded.
Set ZooKeeper properties
You can set ZooKeeper properties using ZooNavigator UI.
- URL: https://{instance-name}-wfaw-{aws-account}-ct1.workfusion.com:10999/zoonavigator
- Connection string: {instance-name}-wfaw-{aws-account}-int1.workfusion.com:2181

To set ZooKeeper with a specific profile property, do as follows:
- Go to the /config/workspace,{your profile name} node, where {your profile name} is the name of your profile.
- Type in a new property and click the Create new node button.
- In the data window, set this property value.
In the example below, the app.value property is set to the zookeeper-ws2 value for the ws2 profile. This property value is used if ws2 profile is enabled.

tip
For additional information, refer to Spring Boot application properties priority.