Dave Syer opened SPR-8985 and commented

SystemProfileValueSource is not very compatible with the new 3.1 default system property profiles. If System.getProperty("spring.profiles.active") is null then the "default" profile is active, which is quite handy in <beans/> configuration. But the old SystemProfileValueSource from 2.0 returns null in that case, which then cannot be matched to anything legal in the @IfProfileValue annotation. I suggest that returning the empty String would be more sensible anyway and won't break any existing code because null is not legal as an annotation value.


Affects: 3.1 GA

Issue Links: - #12410 Decide what to do with @IfProfileValue - #13622 Allow overriding @ActiveProfiles in test classes with system property - #16300 Introduce annotation to skip test based on active Spring profile

Comment From: sbrannen

Closing for the same reasons given in https://github.com/spring-projects/spring-framework/issues/12410#issuecomment-1881249166.