I have a Spring project which uses another project. Each project has its own spring profile initialize from java code using applicationContext.xml and *.p
applicationContext.xml
*.p
If you are using docker to deploy the spring boot app, you can set the profile using the flag e:
docker run -e "SPRING_PROFILES_ACTIVE=prod" -p 8080:8080 -t r.test.co/myapp:latest