View Javadoc

1   package edu.calpoly.records.spring;
2   
3   import java.util.ArrayList;
4   import java.util.List;
5   import java.util.Properties;
6   
7   import org.kuali.common.util.execute.Executable;
8   import org.kuali.common.util.execute.ExecutablesExecutable;
9   import org.kuali.maven.plugins.spring.MavenConstants;
10  import org.springframework.beans.factory.annotation.Autowired;
11  import org.springframework.beans.factory.annotation.Qualifier;
12  import org.springframework.context.annotation.Bean;
13  import org.springframework.context.annotation.Configuration;
14  import org.springframework.context.annotation.Import;
15  import org.springframework.core.env.ConfigurableEnvironment;
16  
17  @Configuration
18  @Import(PrintMessageConfig.class)
19  public class PowerWebappConfig {
20  
21  	@Autowired
22  	PrintMessageConfig pmc;
23  
24  	@Autowired
25  	ConfigurableEnvironment env;
26  
27  	@Autowired
28  	@Qualifier(MavenConstants.DEFAULT_MAVEN_PROPERTIES_BEAN_NAME)
29  	Properties mavenProperties;
30  
31  	@Bean(initMethod = "execute")
32  	public Executable executablesExecutable() {
33  		List<Executable> executables = new ArrayList<Executable>();
34  		executables.add(pmc.printMessageExecutable());
35  		executables.add(new ShowPropertiesExecutable(mavenProperties));
36  		executables.add(new ShowPropertySourcesExecutable(env));
37  		return new ExecutablesExecutable(executables);
38  	}
39  }