From 16a9c6890f0765129429077c0e6165ba95783470 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 13 Oct 2016 11:03:35 +0100 Subject: [PATCH] Workaround for file system issues with Boot 1.4 --- .../launcher/configserver/ConfigServerApplication.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spring-cloud-launcher/spring-cloud-launcher-configserver/src/main/java/org/springframework/cloud/launcher/configserver/ConfigServerApplication.java b/spring-cloud-launcher/spring-cloud-launcher-configserver/src/main/java/org/springframework/cloud/launcher/configserver/ConfigServerApplication.java index 3f613ae..d32868e 100644 --- a/spring-cloud-launcher/spring-cloud-launcher-configserver/src/main/java/org/springframework/cloud/launcher/configserver/ConfigServerApplication.java +++ b/spring-cloud-launcher/spring-cloud-launcher-configserver/src/main/java/org/springframework/cloud/launcher/configserver/ConfigServerApplication.java @@ -16,10 +16,16 @@ package org.springframework.cloud.launcher.configserver; +import java.io.IOException; +import java.nio.file.FileSystems; +import java.util.Collections; + import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.config.server.EnableConfigServer; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; /** * @author Spencer Gibb @@ -29,7 +35,9 @@ import org.springframework.cloud.config.server.EnableConfigServer; @SpringBootApplication public class ConfigServerApplication { - public static void main(String[] args) { + public static void main(String[] args) throws IOException { + Resource resource = new ClassPathResource("/launcher"); + FileSystems.newFileSystem(resource.getURI(), Collections.emptyMap()); SpringApplication.run(ConfigServerApplication.class, args); } }