1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.util.spring.car;
17
18 import java.util.Arrays;
19 import java.util.Properties;
20
21 import org.kuali.common.util.PropertyUtils;
22 import org.kuali.common.util.spring.SpringUtils;
23 import org.springframework.beans.factory.annotation.Autowired;
24 import org.springframework.context.annotation.Bean;
25 import org.springframework.context.annotation.Configuration;
26 import org.springframework.core.env.ConfigurableEnvironment;
27
28 @Configuration
29 public class CarConfig {
30
31 @Autowired
32 ConfigurableEnvironment env;
33
34 @Bean
35 public Object whatever() {
36 SpringUtils.showPropertySources(env);
37 Properties all = SpringUtils.getAllEnumerableProperties(env);
38 PropertyUtils.trim(all, Arrays.asList("car.*"), null);
39 PropertyUtils.info(all);
40 return null;
41 }
42 }