Search in sources :

Example 1 with DelegatingResourceLoader

use of org.springframework.cloud.deployer.resource.support.DelegatingResourceLoader in project java-function-invoker by projectriff.

the class FunctionConfiguration method delegatingResourceLoader.

@Bean
@ConditionalOnMissingBean(DelegatingResourceLoader.class)
public DelegatingResourceLoader delegatingResourceLoader(MavenProperties mavenProperties) {
    Map<String, ResourceLoader> loaders = new HashMap<>();
    loaders.put(MavenResource.URI_SCHEME, new MavenResourceLoader(mavenProperties));
    return new DelegatingResourceLoader(loaders);
}
Also used : DelegatingResourceLoader(org.springframework.cloud.deployer.resource.support.DelegatingResourceLoader) ResourceLoader(org.springframework.core.io.ResourceLoader) MavenResourceLoader(org.springframework.cloud.deployer.resource.maven.MavenResourceLoader) DelegatingResourceLoader(org.springframework.cloud.deployer.resource.support.DelegatingResourceLoader) HashMap(java.util.HashMap) MavenResourceLoader(org.springframework.cloud.deployer.resource.maven.MavenResourceLoader) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

HashMap (java.util.HashMap)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 MavenResourceLoader (org.springframework.cloud.deployer.resource.maven.MavenResourceLoader)1 DelegatingResourceLoader (org.springframework.cloud.deployer.resource.support.DelegatingResourceLoader)1 Bean (org.springframework.context.annotation.Bean)1 ResourceLoader (org.springframework.core.io.ResourceLoader)1