@SpringConfiguration and -Dspring.profiles.active (Arquillian spring extension)


#1

What’s the right way to pass -Dspring.profiles.active via @SpringConfiguration?

I’ve got an Arquillian test annotated with @SpringConfiguration({“application-context.xml”}) and it works fine.

In the application-context.xml, I’ve got some profiles. I want to be able to pass the non-default profile (-Dspring.profiles.active=whatever) to the application context referenced by @SpringConfiguration, but it does not seem work. (My work around is to change the profile manually before I run the test, which is ideal).