I want load application properties using spring boot config server using file system. I am able to read config files like {appname}{profile}.properties using my code. But as per the requirement I need to read properties files with the file name as {appname}.properties.{profile}. I want to know is there any way around to resolve this problem?
Asked
Active
Viewed 170 times
1 Answers
0
One way is to run your app by specifying the renamed properties file as an argument
java -jar {your_app.jar} --spring.config.name={your_app_properties_filename}
so something like
java -jar App.jar --spring.config.name=App.properties.prod
where
appname=App, profile=prod

allkenang
- 1,511
- 15
- 12
-
thanks for your response. but is this possible using spring boot config server. My application configured as config client. – Somnath Guha Aug 28 '19 at 03:38