001    package edu.calpoly.records.spring;
002    
003    import java.util.Properties;
004    
005    import org.kuali.common.util.PropertyUtils;
006    import org.kuali.common.util.execute.Executable;
007    import org.kuali.common.util.spring.SpringUtils;
008    import org.springframework.core.env.ConfigurableEnvironment;
009    
010    public class ShowPropertySourcesExecutable implements Executable {
011    
012            ConfigurableEnvironment environment;
013    
014            public ShowPropertySourcesExecutable(ConfigurableEnvironment environment) {
015                    super();
016                    this.environment = environment;
017            }
018    
019            @Override
020            public void execute() {
021                    Properties properties = SpringUtils.getAllEnumerableProperties(environment);
022                    PropertyUtils.info(properties);
023                    SpringUtils.showPropertySources(environment);
024            }
025    
026            public ConfigurableEnvironment getEnvironment() {
027                    return environment;
028            }
029    
030            public void setEnvironment(ConfigurableEnvironment environment) {
031                    this.environment = environment;
032            }
033    
034    }