Read production or development properties file in spring boot

0

I have the following question, how can I read a .properties file from spring boot depending on the environment in which I am? My project structure is as follows:

I've read this but I can not make it work.

Thank you.

    
asked by 5frags 09.10.2018 в 22:50
source

1 answer

0

That link if the idea works is that you run it once your jar is generated. Example once you have built your jar, then you could run like this: java - jar yourproject.jar --spring.profiles.active = dev Or prod based on the profiles you want.

    
answered by 29.10.2018 в 00:04