001package org.kuali.common.util.properties.spring; 002 003import org.kuali.common.util.spring.PropertySourceUtils; 004import org.kuali.common.util.spring.service.PropertySourceConfig; 005import org.springframework.beans.factory.annotation.Autowired; 006import org.springframework.context.annotation.Bean; 007import org.springframework.context.annotation.Configuration; 008import org.springframework.core.env.ConfigurableEnvironment; 009import org.springframework.core.env.PropertiesPropertySource; 010import org.springframework.core.env.PropertySource; 011 012@Configuration 013public class EnvironmentPropertySourceConfig implements PropertySourceConfig { 014 015 @Autowired 016 ConfigurableEnvironment env; 017 018 @Override 019 @Bean 020 public PropertySource<?> propertySource() { 021 return new PropertiesPropertySource("environmentProperties", PropertySourceUtils.getAllEnumerablePropertiesQuietly(env)); 022 } 023 024} 025 026