View Javadoc

1   package org.kuali.student.deploy.spring;
2   
3   import org.kuali.common.util.properties.PropertiesService;
4   import org.kuali.common.util.properties.spring.DefaultPropertiesServiceConfig;
5   import org.kuali.common.util.spring.PropertySourceUtils;
6   import org.kuali.common.util.spring.service.PropertySourceConfig;
7   import org.springframework.beans.factory.annotation.Autowired;
8   import org.springframework.context.annotation.Bean;
9   import org.springframework.context.annotation.Configuration;
10  import org.springframework.context.annotation.Import;
11  import org.springframework.core.env.PropertySource;
12  
13  @Configuration
14  @Import({ SqlLocationsConfig.class, DefaultPropertiesServiceConfig.class })
15  public class SqlPropertySourceConfig implements PropertySourceConfig {
16  
17  	@Autowired
18  	SqlLocationsConfig locationsConfig;
19  
20  	@Autowired
21  	PropertiesService service;
22  
23  	@Override
24  	@Bean
25  	public PropertySource<?> propertySource() {
26  		return PropertySourceUtils.getPropertySource(service, locationsConfig.propertyLocations());
27  	}
28  }