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.Collections;
19 import java.util.List;
20
21 import org.springframework.context.annotation.Bean;
22 import org.springframework.context.annotation.Configuration;
23 import org.springframework.core.env.PropertySource;
24
25
26
27
28 @Deprecated
29 @Configuration
30 public abstract class AbstractPropertySourceConfig {
31
32
33
34
35 protected List<org.kuali.common.util.property.ProjectProperties> getOtherProjectProperties() {
36 return Collections.emptyList();
37 }
38
39 protected abstract org.kuali.common.util.property.ProjectProperties getProjectProperties();
40
41 public PropertySource<?> getPropertySource() {
42 org.kuali.common.util.property.ProjectProperties project = getProjectProperties();
43 List<org.kuali.common.util.property.ProjectProperties> others = getOtherProjectProperties();
44 return SpringUtils.getGlobalPropertySource(project, others);
45 }
46
47 @Bean
48 public PropertySource<?> springPropertySource() {
49 return getPropertySource();
50 }
51
52 }