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