001    package edu.calpoly.records.spring;
002    
003    import java.util.ArrayList;
004    import java.util.List;
005    import java.util.Properties;
006    
007    import org.kuali.common.util.execute.Executable;
008    import org.kuali.common.util.execute.ExecutablesExecutable;
009    import org.kuali.maven.plugins.spring.MavenConstants;
010    import org.springframework.beans.factory.annotation.Autowired;
011    import org.springframework.beans.factory.annotation.Qualifier;
012    import org.springframework.context.annotation.Bean;
013    import org.springframework.context.annotation.Configuration;
014    import org.springframework.context.annotation.Import;
015    import org.springframework.core.env.ConfigurableEnvironment;
016    
017    @Configuration
018    @Import(PrintMessageConfig.class)
019    public class PowerWebappConfig {
020    
021            @Autowired
022            PrintMessageConfig pmc;
023    
024            @Autowired
025            ConfigurableEnvironment env;
026    
027            @Autowired
028            @Qualifier(MavenConstants.DEFAULT_MAVEN_PROPERTIES_BEAN_NAME)
029            Properties mavenProperties;
030    
031            @Bean(initMethod = "execute")
032            public Executable executablesExecutable() {
033                    List<Executable> executables = new ArrayList<Executable>();
034                    executables.add(pmc.printMessageExecutable());
035                    executables.add(new ShowPropertiesExecutable(mavenProperties));
036                    executables.add(new ShowPropertySourcesExecutable(env));
037                    return new ExecutablesExecutable(executables);
038            }
039    }