Changes to compile with boot 2.1.0
This commit is contained in:
@@ -21,6 +21,7 @@ import java.util.UUID;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.cloud.consul.ConsulProperties;
|
||||
@@ -72,7 +73,7 @@ public class ConsulPropertySourceLocatorAppNameCustomizedTests {
|
||||
|
||||
|
||||
this.context = new SpringApplicationBuilder(Config.class)
|
||||
.web(false)
|
||||
.web(WebApplicationType.NONE)
|
||||
.run("--spring.application.name=testConsulPropertySourceLocatorAppNameCustomized",
|
||||
"--spring.cloud.consul.config.name="+CONFIG_NAME,
|
||||
"--spring.cloud.consul.config.prefix="+ROOT);
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.util.UUID;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.cloud.consul.ConsulProperties;
|
||||
@@ -80,7 +81,7 @@ public class ConsulPropertySourceLocatorFilesTests {
|
||||
this.client.setKVValue(ROOT+APP_NAME_DEV_PROPS, "foo: bar-app-dev\nmy.baz: ${foo}");
|
||||
|
||||
this.context = new SpringApplicationBuilder(Config.class)
|
||||
.web(false)
|
||||
.web(WebApplicationType.NONE)
|
||||
.run("--spring.application.name="+ APP_NAME,
|
||||
"--spring.cloud.consul.config.prefix="+ROOT,
|
||||
"--spring.cloud.consul.config.format=FILES",
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.cloud.consul.ConsulProperties;
|
||||
@@ -102,7 +103,7 @@ public class ConsulPropertySourceLocatorTests {
|
||||
|
||||
|
||||
this.context = new SpringApplicationBuilder(Config.class)
|
||||
.web(false)
|
||||
.web(WebApplicationType.NONE)
|
||||
.run("--SPRING_APPLICATION_NAME="+ APP_NAME,
|
||||
"--spring.cloud.consul.config.prefix="+ROOT,
|
||||
"spring.cloud.consul.config.watch.delay=10");
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.cloud.consul.discovery.configclient;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.cloud.config.server.config.ConfigServerProperties;
|
||||
@@ -64,7 +65,7 @@ public class ConsulConfigServerAutoConfigurationTests {
|
||||
this.context = new SpringApplicationBuilder(
|
||||
PropertyPlaceholderAutoConfiguration.class,
|
||||
ConsulConfigServerAutoConfiguration.class,
|
||||
ConfigServerProperties.class, ConsulDiscoveryProperties.class).web(false)
|
||||
ConfigServerProperties.class, ConsulDiscoveryProperties.class).web(WebApplicationType.NONE)
|
||||
.properties(env).run();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user