Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
d5abd57a
Commit
d5abd57a
authored
May 22, 2018
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated use of spring.main.web-environment
Closes gh-13231
parent
a124379d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
18 deletions
+18
-18
OverrideSourcesTests.java
...t/java/org/springframework/boot/OverrideSourcesTests.java
+3
-3
SimpleMainTests.java
...c/test/java/org/springframework/boot/SimpleMainTests.java
+1
-1
SpringApplicationTests.java
...java/org/springframework/boot/SpringApplicationTests.java
+1
-1
SampleAtmosphereApplicationTests.java
...a/sample/atmosphere/SampleAtmosphereApplicationTests.java
+1
-1
SampleWebSocketsApplicationTests.java
...les/websocket/jetty/SampleWebSocketsApplicationTests.java
+2
-2
CustomContainerWebSocketsApplicationTests.java
...jetty/echo/CustomContainerWebSocketsApplicationTests.java
+2
-2
SampleWebSocketsApplicationTests.java
...es/websocket/tomcat/SampleWebSocketsApplicationTests.java
+2
-2
CustomContainerWebSocketsApplicationTests.java
...omcat/echo/CustomContainerWebSocketsApplicationTests.java
+2
-2
SampleWebSocketsApplicationTests.java
.../websocket/undertow/SampleWebSocketsApplicationTests.java
+2
-2
CustomContainerWebSocketsApplicationTests.java
...ertow/echo/CustomContainerWebSocketsApplicationTests.java
+2
-2
No files found.
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/OverrideSourcesTests.java
View file @
d5abd57a
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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=fals
e"
});
new
String
[]
{
"--spring.main.web
-application-type=non
e"
});
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=fals
e"
,
new
String
[]
{
"--spring.main.web
-application-type=non
e"
,
"--spring.main.sources=org.springframework.boot.OverrideSourcesTests.MainConfiguration"
});
assertThat
(
this
.
context
.
getBean
(
Service
.
class
).
bean
.
name
).
isEqualTo
(
"bar"
);
}
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SimpleMainTests.java
View file @
d5abd57a
...
...
@@ -77,7 +77,7 @@ public class SimpleMainTests {
private
String
[]
getArgs
(
String
...
args
)
{
List
<
String
>
list
=
new
ArrayList
<>(
Arrays
.
asList
(
"--spring.main.web
Environment=fals
e"
,
"--spring.main.showBanner=OFF"
,
"--spring.main.web
-application-type=non
e"
,
"--spring.main.showBanner=OFF"
,
"--spring.main.registerShutdownHook=false"
));
if
(
args
.
length
>
0
)
{
list
.
add
(
"--spring.main.sources="
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java
View file @
d5abd57a
...
...
@@ -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
())
...
...
spring-boot-samples/spring-boot-sample-atmosphere/src/test/java/sample/atmosphere/SampleAtmosphereApplicationTests.java
View file @
d5abd57a
...
...
@@ -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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
messagePayloadReference
=
context
.
getBean
(
ClientConfiguration
.
class
).
messagePayload
;
...
...
spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java
View file @
d5abd57a
...
...
@@ -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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
messagePayloadReference
=
context
.
getBean
(
ClientConfiguration
.
class
).
messagePayload
;
...
...
spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java
View file @
d5abd57a
...
...
@@ -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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
messagePayloadReference
=
context
.
getBean
(
ClientConfiguration
.
class
).
messagePayload
;
...
...
spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/SampleWebSocketsApplicationTests.java
View file @
d5abd57a
...
...
@@ -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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
messagePayloadReference
=
context
.
getBean
(
ClientConfiguration
.
class
).
messagePayload
;
...
...
spring-boot-samples/spring-boot-sample-websocket-tomcat/src/test/java/samples/websocket/tomcat/echo/CustomContainerWebSocketsApplicationTests.java
View file @
d5abd57a
...
...
@@ -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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
messagePayloadReference
=
context
.
getBean
(
ClientConfiguration
.
class
).
messagePayload
;
...
...
spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/SampleWebSocketsApplicationTests.java
View file @
d5abd57a
...
...
@@ -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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
messagePayloadReference
=
context
.
getBean
(
ClientConfiguration
.
class
).
messagePayload
;
...
...
spring-boot-samples/spring-boot-sample-websocket-undertow/src/test/java/samples/websocket/undertow/echo/CustomContainerWebSocketsApplicationTests.java
View file @
d5abd57a
...
...
@@ -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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
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=fals
e"
);
.
run
(
"--spring.main.web
-application-type=non
e"
);
long
count
=
context
.
getBean
(
ClientConfiguration
.
class
).
latch
.
getCount
();
AtomicReference
<
String
>
messagePayloadReference
=
context
.
getBean
(
ClientConfiguration
.
class
).
messagePayload
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment