Santoshkumar Kalasa :
How to create project architecture to support multiple envionment. Each environment will have different datasource from different property file like(dev-propertfile,test-propertyFil,Production-propertyfile) with help of spring's
org.springframework.core.env.Environment;
USM :
I'll give step by step procedure for Spring boot applications.
- Inside /src/main/resources/application.properties mention spring.profiles.active=dev (or Prod)
- Create /src/main/resources/application-dev.properties and give your custom dev configurations here.
- Create /src/main/resources/application-prod.properties and give your custom prod configurations here.
Run.
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=452612&siteId=1