uoa-repository-manager-service/src/main/java/eu/dnetlib/repo/manager/config/Config.java

25 lines
965 B
Java

package eu.dnetlib.repo.manager.config;
import org.bouncycastle.util.Arrays;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.context.annotation.*;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import java.io.IOException;
@Configuration
@ImportResource("classpath*:/gr/uoa/di/driver/app/springContext-commons.xml")
public class Config {
@Bean
public PropertySourcesPlaceholderConfigurer getPropertySourcesPlaceholderConfigurer() throws IOException {
PropertySourcesPlaceholderConfigurer ppc = new PropertySourcesPlaceholderConfigurer();
ppc.setLocations((new PathMatchingResourcePatternResolver().getResources("classpath*:/**/springContext-*.properties")));
ppc.setIgnoreResourceNotFound(true);
return ppc;
}
}