001package org.kuali.common.util.properties.spring; 002 003import org.kuali.common.util.properties.PropertiesService; 004import org.kuali.common.util.spring.PropertySourceUtils; 005import org.kuali.common.util.spring.service.PropertySourceConfig; 006import org.springframework.beans.factory.annotation.Autowired; 007import org.springframework.context.annotation.Bean; 008import org.springframework.context.annotation.Configuration; 009import org.springframework.core.env.PropertySource; 010 011@Configuration 012public class LocationPropertySourceConfig implements PropertySourceConfig { 013 014 @Autowired 015 PropertyLocationsConfig locationsConfig; 016 017 @Autowired 018 PropertiesService service; 019 020 @Override 021 @Bean 022 public PropertySource<?> propertySource() { 023 return PropertySourceUtils.getPropertySource(service, locationsConfig.propertyLocations()); 024 } 025 026}