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
3e9c2b84
Commit
3e9c2b84
authored
Nov 18, 2017
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix default ReactiveWebApplicationContext class
Closes gh-11074
parent
382267d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
SpringApplication.java
...main/java/org/springframework/boot/SpringApplication.java
+1
-1
SpringApplicationTests.java
...java/org/springframework/boot/SpringApplicationTests.java
+4
-3
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
View file @
3e9c2b84
...
@@ -175,7 +175,7 @@ public class SpringApplication {
...
@@ -175,7 +175,7 @@ public class SpringApplication {
* environments.
* environments.
*/
*/
public
static
final
String
DEFAULT_REACTIVE_WEB_CONTEXT_CLASS
=
"org.springframework."
public
static
final
String
DEFAULT_REACTIVE_WEB_CONTEXT_CLASS
=
"org.springframework."
+
"boot.web.reactive.context.ReactiveWebServerApplicationContext"
;
+
"boot.web.reactive.context.
AnnotationConfig
ReactiveWebServerApplicationContext"
;
private
static
final
String
REACTIVE_WEB_ENVIRONMENT_CLASS
=
"org.springframework."
private
static
final
String
REACTIVE_WEB_ENVIRONMENT_CLASS
=
"org.springframework."
+
"web.reactive.DispatcherHandler"
;
+
"web.reactive.DispatcherHandler"
;
...
...
spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java
View file @
3e9c2b84
...
@@ -57,8 +57,8 @@ import org.springframework.boot.context.event.ApplicationStartingEvent;
...
@@ -57,8 +57,8 @@ import org.springframework.boot.context.event.ApplicationStartingEvent;
import
org.springframework.boot.testsupport.rule.OutputCapture
;
import
org.springframework.boot.testsupport.rule.OutputCapture
;
import
org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory
;
import
org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory
;
import
org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext
;
import
org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext
;
import
org.springframework.boot.web.reactive.context.ReactiveWebApplicationContext
;
import
org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext
;
import
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
;
import
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.ApplicationContextAware
;
...
@@ -405,12 +405,13 @@ public class SpringApplicationTests {
...
@@ -405,12 +405,13 @@ public class SpringApplicationTests {
}
}
@Test
@Test
public
void
defaultApplicationContextForReactiveWeb
()
throws
Exception
{
public
void
defaultApplicationContextForReactiveWeb
()
{
SpringApplication
application
=
new
SpringApplication
(
SpringApplication
application
=
new
SpringApplication
(
ExampleReactiveWebConfig
.
class
);
ExampleReactiveWebConfig
.
class
);
application
.
setWebApplicationType
(
WebApplicationType
.
REACTIVE
);
application
.
setWebApplicationType
(
WebApplicationType
.
REACTIVE
);
this
.
context
=
application
.
run
();
this
.
context
=
application
.
run
();
assertThat
(
this
.
context
).
isInstanceOf
(
ReactiveWebServerApplicationContext
.
class
);
assertThat
(
this
.
context
).
isInstanceOf
(
AnnotationConfigReactiveWebServerApplicationContext
.
class
);
}
}
@Test
@Test
...
...
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