I have this scenario where I need to load properties file according to the server name.
I have resource
in this structure.
I have 2 different servers. let say SERV-A and SERV-B and each of these servers have their sperate e1, e2 servers. eg.. SERV-A-e1, SERV-A-e2, SERV-B-e1, SERV-B-e2
. The code base is same.
resource - |
|-SERV-A - |
|-application.properties
|-application-e1.properties
|-application-e2.properties
|-SERV-B - |
|-application.properties
|-application-e1.properties
|-application-e2.properties
So I want that when I deploy my application on server SERV-A it should read application.properties and application-e1.properties files from resource/SERV-A
and when I deploy it on server SERV-B then it should read from resource/SERV-A