I am not sure, but check if you can make use @ConfigurationProperties of Spring boot framework.
@ConfigurationProperties(locations = "classpath:application.properties", ignoreUnknownFields = false, prefix = "spring.datasource")
- You can keep this application.properties file in you classpath
- Change the properties in this file without redeploying the application
Java Experts - I am just trying to explore my view. Corrections are always welcome.
Edit - I read a good examples on @PropertySource here