I've a Spring boot(with embedded tomcat 8) project with multiple server components that get deployed in multiple env(dev/test/prod) How do you make one jar that can be deployed into multiple env in such a way that in each env the jar will pick up appropriate env params such as db and other server urls that each env supposed to use. The objective is not to touch the jar file which invalidates QA process. If it's traditional deployment, I typically change a flag in the properties file to indicate the env and the rest of the properties are read based on that param.
Asked
Active
Viewed 412 times
0
-
1Should have a look at spring profiles: http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-profiles.html *"Spring Profiles provide a way to segregate parts of your application configuration and make it only available in certain environments"* – Sid Jun 22 '16 at 16:53
-
@Sid Thanks a lot. This helps – Sïd Jun 23 '16 at 16:41