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
6a1f61c1
Commit
6a1f61c1
authored
May 13, 2020
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.2.x'
parents
9be7fa8e
daed5120
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
CompositeHandlerExceptionResolver.java
...figure/web/servlet/CompositeHandlerExceptionResolver.java
+6
-9
WebMvcEndpointChildContextConfigurationIntegrationTests.java
...MvcEndpointChildContextConfigurationIntegrationTests.java
+1
-1
ServerProperties.java
...ingframework/boot/autoconfigure/web/ServerProperties.java
+6
-1
TomcatServletWebServerFactoryCustomizer.java
.../web/servlet/TomcatServletWebServerFactoryCustomizer.java
+1
-1
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/servlet/CompositeHandlerExceptionResolver.java
View file @
6a1f61c1
...
...
@@ -19,7 +19,6 @@ package org.springframework.boot.actuate.autoconfigure.web.servlet;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Optional
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -52,15 +51,13 @@ class CompositeHandlerExceptionResolver implements HandlerExceptionResolver {
if
(
this
.
resolvers
==
null
)
{
this
.
resolvers
=
extractResolvers
();
}
Optional
<
ModelAndView
>
modelAndView
=
this
.
resolvers
.
stream
()
ModelAndView
resolved
=
this
.
resolvers
.
stream
()
.
map
((
resolver
)
->
resolver
.
resolveException
(
request
,
response
,
handler
,
ex
)).
filter
(
Objects:
:
nonNull
)
.
findFirst
();
modelAndView
.
ifPresent
((
mav
)
->
{
if
(
mav
.
isEmpty
())
{
request
.
setAttribute
(
"javax.servlet.error.exception"
,
ex
);
}
});
return
modelAndView
.
orElse
(
null
);
.
findFirst
().
orElse
(
null
);
if
(
resolved
!=
null
&&
resolved
.
isEmpty
())
{
request
.
setAttribute
(
"javax.servlet.error.exception"
,
ex
);
}
return
resolved
;
}
private
List
<
HandlerExceptionResolver
>
extractResolvers
()
{
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/WebMvcEndpointChildContextConfigurationIntegrationTests.java
View file @
6a1f61c1
...
...
@@ -136,7 +136,7 @@ class WebMvcEndpointChildContextConfigurationIntegrationTests {
@SuppressWarnings
(
"unchecked"
)
private
Map
<
String
,
?>
getResponseBody
(
ClientResponse
response
)
{
return
(
Map
<
String
,
?>)
response
.
bodyToMono
(
Map
.
class
).
block
();
return
response
.
bodyToMono
(
Map
.
class
).
block
();
}
@Endpoint
(
id
=
"fail"
)
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
View file @
6a1f61c1
...
...
@@ -538,7 +538,12 @@ public class ServerProperties {
this
.
redirectContextRoot
=
redirectContextRoot
;
}
public
boolean
getUseRelativeRedirects
()
{
@Deprecated
public
Boolean
getUseRelativeRedirects
()
{
return
this
.
useRelativeRedirects
;
}
public
boolean
isUseRelativeRedirects
()
{
return
this
.
useRelativeRedirects
;
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/TomcatServletWebServerFactoryCustomizer.java
View file @
6a1f61c1
...
...
@@ -54,7 +54,7 @@ public class TomcatServletWebServerFactoryCustomizer
if
(
tomcatProperties
.
getRedirectContextRoot
()
!=
null
)
{
customizeRedirectContextRoot
(
factory
,
tomcatProperties
.
getRedirectContextRoot
());
}
customizeUseRelativeRedirects
(
factory
,
tomcatProperties
.
get
UseRelativeRedirects
());
customizeUseRelativeRedirects
(
factory
,
tomcatProperties
.
is
UseRelativeRedirects
());
factory
.
setDisableMBeanRegistry
(!
tomcatProperties
.
getMbeanregistry
().
isEnabled
());
}
...
...
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