I am looking for a clean way to load values from properties file using the environment value passed from the command line (maven project). I then plan to use the loaded values in Java cucumber test.
Usage : mvn test -Denvironment=staging (it then loads the values from the staging file i.e. application-staging.properties, etc).
I know spring boot offers profiles, wondering if I can do this use a clean approach using the generic spring framework (annotations).