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
38584f06
Commit
38584f06
authored
Mar 24, 2021
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.4.x'
Closes gh-25785
parents
9d76ad58
5274cf24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
AbstractWebMvcEndpointHandlerMapping.java
...int/web/servlet/AbstractWebMvcEndpointHandlerMapping.java
+9
-6
No files found.
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java
View file @
38584f06
...
@@ -54,9 +54,9 @@ import org.springframework.util.StringUtils;
...
@@ -54,9 +54,9 @@ import org.springframework.util.StringUtils;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.method.HandlerMethod
;
import
org.springframework.web.server.ResponseStatusException
;
import
org.springframework.web.servlet.HandlerMapping
;
import
org.springframework.web.servlet.HandlerMapping
;
import
org.springframework.web.servlet.handler.MatchableHandlerMapping
;
import
org.springframework.web.servlet.handler.MatchableHandlerMapping
;
import
org.springframework.web.servlet.handler.RequestMatchResult
;
import
org.springframework.web.servlet.handler.RequestMatchResult
;
...
@@ -291,7 +291,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
...
@@ -291,7 +291,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
return
handleResult
(
this
.
operation
.
invoke
(
invocationContext
),
HttpMethod
.
resolve
(
request
.
getMethod
()));
return
handleResult
(
this
.
operation
.
invoke
(
invocationContext
),
HttpMethod
.
resolve
(
request
.
getMethod
()));
}
}
catch
(
InvalidEndpointRequestException
ex
)
{
catch
(
InvalidEndpointRequestException
ex
)
{
throw
new
BadOperationRequestException
(
ex
.
getReason
()
);
throw
new
InvalidEndpointBadRequestException
(
ex
);
}
}
}
}
...
@@ -404,11 +404,14 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
...
@@ -404,11 +404,14 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
}
}
@ResponseStatus
(
code
=
HttpStatus
.
BAD_REQUEST
)
/**
private
static
class
BadOperationRequestException
extends
RuntimeException
{
* Nested exception used to wrap a {@link InvalidEndpointRequestException} and provide
* a {@link HttpStatus#BAD_REQUEST} status.
*/
private
static
class
InvalidEndpointBadRequestException
extends
ResponseStatusException
{
BadOperationRequestException
(
String
messag
e
)
{
InvalidEndpointBadRequestException
(
InvalidEndpointRequestException
caus
e
)
{
super
(
messag
e
);
super
(
HttpStatus
.
BAD_REQUEST
,
cause
.
getReason
(),
caus
e
);
}
}
}
}
...
...
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