Updated to use DelegatedResourceLoader that can use an empty loaders map

This commit is contained in:
Glenn Renfro
2016-07-06 22:14:41 -04:00
committed by Michael Minella
parent 7f1ece96e6
commit de3d09664e
2 changed files with 16 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ import java.util.Map;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.deployer.resource.maven.MavenProperties;
import org.springframework.cloud.deployer.resource.maven.MavenResourceLoader;
@@ -63,4 +64,15 @@ public class ResourceLoadingAutoConfiguration {
@ConfigurationProperties(prefix = "maven")
public static class MavenConfigurationProperties extends MavenProperties {}
}
@Configuration
@ConditionalOnMissingClass("org.springframework.cloud.deployer.resource.maven.MavenResourceLoader")
public static class LocalResourceLoadingAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public DelegatingResourceLoader delegatingResourceLoader() {
return new DelegatingResourceLoader();
}
}
}