...
To avoid it, we can keep only those properties in the OOM which needs to be changed based on deployment and provide an ability for overriding any property if required.
Possible Solutions
Final Approach: Approach 2 - Spring Profile
In any spring application, application properties can be provided in multiple ways, listed below in ascending order of priority.
- configured in thebapplicationthe application.yml in the resources folder
- configured in the application-<profile>.yml in the resources folder
- environment variables
- system property to JVM using -Dkey=value
...