1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.spring;
17
18 import java.util.List;
19 import java.util.Properties;
20
21 import org.kuali.common.util.execute.Executable;
22 import org.kuali.common.util.execute.ShowPropertiesExecutable;
23 import org.kuali.common.util.maven.MavenConstants;
24 import org.springframework.beans.factory.annotation.Autowired;
25 import org.springframework.beans.factory.annotation.Qualifier;
26 import org.springframework.context.annotation.Bean;
27 import org.springframework.context.annotation.Configuration;
28 import org.springframework.core.env.Environment;
29
30 @Configuration
31 public class ShowMavenPropertiesConfig {
32
33 @Autowired
34 Environment env;
35
36 @Autowired
37 @Qualifier(MavenConstants.PROPERTIES_BEAN_NAME)
38 Properties mavenProperties;
39
40 @Bean
41 public Executable showPropertiesExecutable() {
42 List<String> includes = SpringUtils.getListFromCSV(env, "properties.show.includes", "*");
43 List<String> excludes = SpringUtils.getListFromCSV(env, "properties.show.excludes", "");
44
45 ShowPropertiesExecutable executable = new ShowPropertiesExecutable();
46 executable.setProperties(mavenProperties);
47 executable.setExcludes(excludes);
48 executable.setIncludes(includes);
49 return executable;
50 }
51
52 }