How get working @Value or Environment in a class implementing the Condition/ConfigurationCondition interfaces
问题 I am working with only JavaConfig. I have the following declaration: @Bean public static PropertySourcesPlaceholderConfigurer propertyPlaceholderConfigurer() { return new PropertySourcesPlaceholderConfigurer(); } it is mandatory for JavaConfig according with the following post: Spring 3.2 @value annotation with pure java configuration does not work, but Environment.getProperty works The following code works perfect (many @Values by testing purposes): @Configuration public class