What am I doing?
I have an application that I want to test in different environments - dev, staging, etc.
What am I doing?
I use the maven cargo plugin to deploy an application war to run integration tests.
What I need?
I need to run my test to draw spring.profiles.active based on the environment variable set by the load, e.g.
<container> <containerId>tomcat7x</containerId> <systemProperties> <spring.profiles.active>development</spring.profiles.active> </systemProperties> </container>
Why?
so that I can remove @ActiveProfiles("development") in my @ActiveProfiles("development") integration test, and the test can conclude which active profile is from the environment variable
Question
- I found Spring integration tests with a profile that mention using ActiveProfilesResolver
- I tried to find how I can use it, but could not find any resources
I am looking for guidance / recommendations for using ActiveProfilesResolver
source share