As per my understanding, the @Profile annotation looks for the value of spring.profiles.active system property. Can we map @Profile with the custom profile resource so that instead of using the value of spring.profiles.active, it uses the value of env for some of the classes.
I have seen one of the annotation @IfProfileValue(name = "env", values = { "dev", "qa", "uat" }), which i thought, would work for me, because in this case name provides the profile resource and the env should be set as system property (e.g; -denv=qa). But this seems to be working only with test classes
Any solution for the problem?