diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java index a64864fddc2..0e7dd9c30cf 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,7 +47,7 @@ public class OverrideSourcesTests { @Test public void beanInjectedToMainConfiguration() { this.context = SpringApplication.run(new Class[] { MainConfiguration.class }, - new String[] { "--spring.main.web_environment=false" }); + new String[] { "--spring.main.web-application-type=none" }); assertThat(this.context.getBean(Service.class).bean.name).isEqualTo("foo"); } @@ -55,7 +55,7 @@ public class OverrideSourcesTests { public void primaryBeanInjectedProvingSourcesNotOverridden() { this.context = SpringApplication.run( new Class[] { MainConfiguration.class, TestConfiguration.class }, - new String[] { "--spring.main.web_environment=false", + new String[] { "--spring.main.web-application-type=none", "--spring.main.sources=org.springframework.boot.OverrideSourcesTests.MainConfiguration" }); assertThat(this.context.getBean(Service.class).bean.name).isEqualTo("bar"); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SimpleMainTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SimpleMainTests.java index 1d9ae14aad8..fbf840d7d30 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SimpleMainTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SimpleMainTests.java @@ -77,7 +77,7 @@ public class SimpleMainTests { private String[] getArgs(String... args) { List list = new ArrayList<>(Arrays.asList( - "--spring.main.webEnvironment=false", "--spring.main.showBanner=OFF", + "--spring.main.web-application-type=none", "--spring.main.showBanner=OFF", "--spring.main.registerShutdownHook=false")); if (args.length > 0) { list.add("--spring.main.sources=" diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index eca12b4738d..7740fb0c33c 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -1091,7 +1091,7 @@ public class SpringApplicationTests { @Test public void nonWebApplicationConfiguredViaAPropertyHasTheCorrectTypeOfContextAndEnvironment() { ConfigurableApplicationContext context = new SpringApplication( - ExampleConfig.class).run("--spring.main.web-application-type=NONE"); + ExampleConfig.class).run("--spring.main.web-application-type=none"); assertThat(context).isNotInstanceOfAny(WebApplicationContext.class, ReactiveWebApplicationContext.class); assertThat(context.getEnvironment()) diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java b/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java index 6dec510844d..252e30fc9d6 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java @@ -59,7 +59,7 @@ public class SampleAtmosphereApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/chat/websocket") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; diff --git a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java index f52937d9292..cf9445d47b4 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java @@ -59,7 +59,7 @@ public class SampleWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/echo/websocket") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; @@ -75,7 +75,7 @@ public class SampleWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties( "websocket.uri:ws://localhost:" + this.port + "/reverse") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; diff --git a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java index d7b65e4304b..51a2ef65a73 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java @@ -65,7 +65,7 @@ public class CustomContainerWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/ws/echo/websocket") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; @@ -81,7 +81,7 @@ public class CustomContainerWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/ws/reverse") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; diff --git a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java index 86e6d8bf759..eeee5103ba0 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java @@ -59,7 +59,7 @@ public class SampleWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/echo/websocket") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; @@ -75,7 +75,7 @@ public class SampleWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties( "websocket.uri:ws://localhost:" + this.port + "/reverse") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; diff --git a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java index ca0e4546991..ef6dd197869 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java @@ -65,7 +65,7 @@ public class CustomContainerWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/ws/echo/websocket") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; @@ -81,7 +81,7 @@ public class CustomContainerWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/ws/reverse") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; diff --git a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java index 2c85806ce6f..f339d990d3b 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java @@ -59,7 +59,7 @@ public class SampleWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/echo/websocket") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; @@ -75,7 +75,7 @@ public class SampleWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties( "websocket.uri:ws://localhost:" + this.port + "/reverse") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; diff --git a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java index 4f7254259f6..e6ee34f88ad 100644 --- a/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java +++ b/spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java @@ -65,7 +65,7 @@ public class CustomContainerWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/ws/echo/websocket") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload; @@ -81,7 +81,7 @@ public class CustomContainerWebSocketsApplicationTests { ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class) .properties("websocket.uri:ws://localhost:" + this.port + "/ws/reverse") - .run("--spring.main.web_environment=false"); + .run("--spring.main.web-application-type=none"); long count = context.getBean(ClientConfiguration.class).latch.getCount(); AtomicReference messagePayloadReference = context .getBean(ClientConfiguration.class).messagePayload;