Avatar of Rohit Bajaj
Rohit Bajaj
Flag for India asked on

making environment specific property files in spring mvc

HI,
I am having following project structure :
resources->properties ->[database.properties, log4j.properties]
I want to create a new project structure in which inside the properties folder there will be following folders
DEV
PROD
QA
each having there own database.properties and log4j.properties file.

I am using maven with spring mvc. How do i make this possible so that when i build the project the right property file gets picked up based on the system environment variables.
eg. if the system environment variable env = DEV then properties files under the dev folder should be used.

Thanks
Web DevelopmentJavaJava EE

Avatar of undefined
Last Comment
mccarl

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
mccarl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck