loading default properties
This commit is contained in:
parent
24a93263b0
commit
275ce34ce4
|
@ -1,13 +1,24 @@
|
||||||
package eu.dnetlib.repo.manager.config;
|
package eu.dnetlib.repo.manager.config;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.bouncycastle.util.Arrays;
|
||||||
import org.springframework.context.annotation.ImportResource;
|
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.*;
|
||||||
import org.springframework.context.annotation.PropertySources;
|
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
||||||
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ImportResource("classpath*:/gr/uoa/di/driver/app/springContext-commons.xml")
|
@ImportResource("classpath*:/gr/uoa/di/driver/app/springContext-commons.xml")
|
||||||
@PropertySource(value = "classpath*:/gr/**/springContext-*.properties", ignoreResourceNotFound = true)
|
|
||||||
@PropertySource(value = "classpath*:/eu/**/springContext-*.properties", ignoreResourceNotFound = true)
|
|
||||||
public class Config {
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue