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
20546024
Commit
20546024
authored
Jun 20, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.0.x'
parents
8b35d06c
e1774672
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
SpringBootTestContextBootstrapper.java
.../boot/test/context/SpringBootTestContextBootstrapper.java
+4
-1
SpringApplication.java
...main/java/org/springframework/boot/SpringApplication.java
+4
-1
No files found.
spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java
View file @
20546024
...
...
@@ -86,6 +86,8 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
private
static
final
String
MVC_WEB_ENVIRONMENT_CLASS
=
"org.springframework."
+
"web.servlet.DispatcherServlet"
;
private
static
final
String
JERSEY_WEB_ENVIRONMENT_CLASS
=
"org.glassfish.jersey.server.ResourceConfig"
;
private
static
final
String
ACTIVATE_SERVLET_LISTENER
=
"org.springframework.test."
+
"context.web.ServletTestExecutionListener.activateListener"
;
...
...
@@ -192,7 +194,8 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
private
WebApplicationType
deduceWebApplicationType
()
{
if
(
ClassUtils
.
isPresent
(
REACTIVE_WEB_ENVIRONMENT_CLASS
,
null
)
&&
!
ClassUtils
.
isPresent
(
MVC_WEB_ENVIRONMENT_CLASS
,
null
))
{
&&
!
ClassUtils
.
isPresent
(
MVC_WEB_ENVIRONMENT_CLASS
,
null
)
&&
!
ClassUtils
.
isPresent
(
JERSEY_WEB_ENVIRONMENT_CLASS
,
null
))
{
return
WebApplicationType
.
REACTIVE
;
}
for
(
String
className
:
WEB_ENVIRONMENT_CLASSES
)
{
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
View file @
20546024
...
...
@@ -183,6 +183,8 @@ public class SpringApplication {
private
static
final
String
MVC_WEB_ENVIRONMENT_CLASS
=
"org.springframework."
+
"web.servlet.DispatcherServlet"
;
private
static
final
String
JERSEY_WEB_ENVIRONMENT_CLASS
=
"org.glassfish.jersey.server.ResourceConfig"
;
/**
* Default banner location.
*/
...
...
@@ -271,7 +273,8 @@ public class SpringApplication {
private
WebApplicationType
deduceWebApplicationType
()
{
if
(
ClassUtils
.
isPresent
(
REACTIVE_WEB_ENVIRONMENT_CLASS
,
null
)
&&
!
ClassUtils
.
isPresent
(
MVC_WEB_ENVIRONMENT_CLASS
,
null
))
{
&&
!
ClassUtils
.
isPresent
(
MVC_WEB_ENVIRONMENT_CLASS
,
null
)
&&
!
ClassUtils
.
isPresent
(
JERSEY_WEB_ENVIRONMENT_CLASS
,
null
))
{
return
WebApplicationType
.
REACTIVE
;
}
for
(
String
className
:
WEB_ENVIRONMENT_CLASSES
)
{
...
...
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