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
be9291a3
Commit
be9291a3
authored
Dec 28, 2017
by
Madhura Bhave
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Match trailing slash in actuator endpoints
Fixes gh-11024
parent
c29fe057
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
AbstractWebMvcEndpointHandlerMapping.java
...int/web/servlet/AbstractWebMvcEndpointHandlerMapping.java
+1
-1
AbstractWebEndpointIntegrationTests.java
...ate/endpoint/web/AbstractWebEndpointIntegrationTests.java
+7
-0
No files found.
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/servlet/AbstractWebMvcEndpointHandlerMapping.java
View file @
be9291a3
...
@@ -149,7 +149,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping
...
@@ -149,7 +149,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping
private
PatternsRequestCondition
patternsRequestConditionForPattern
(
String
path
)
{
private
PatternsRequestCondition
patternsRequestConditionForPattern
(
String
path
)
{
String
[]
patterns
=
new
String
[]
{
this
.
endpointMapping
.
createSubPath
(
path
)
};
String
[]
patterns
=
new
String
[]
{
this
.
endpointMapping
.
createSubPath
(
path
)
};
return
new
PatternsRequestCondition
(
patterns
,
null
,
null
,
false
,
fals
e
);
return
new
PatternsRequestCondition
(
patterns
,
null
,
null
,
false
,
tru
e
);
}
}
private
String
[]
toStringArray
(
Collection
<
String
>
collection
)
{
private
String
[]
toStringArray
(
Collection
<
String
>
collection
)
{
...
...
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/web/AbstractWebEndpointIntegrationTests.java
View file @
be9291a3
...
@@ -122,6 +122,13 @@ public abstract class AbstractWebEndpointIntegrationTests<T extends Configurable
...
@@ -122,6 +122,13 @@ public abstract class AbstractWebEndpointIntegrationTests<T extends Configurable
(
client
)
->
client
.
get
().
uri
(
""
).
exchange
().
expectStatus
().
isNotFound
());
(
client
)
->
client
.
get
().
uri
(
""
).
exchange
().
expectStatus
().
isNotFound
());
}
}
@Test
public
void
operationWithTrailingSlashShouldMatch
()
{
load
(
TestEndpointConfiguration
.
class
,
(
client
)
->
client
.
get
().
uri
(
"/test/"
).
exchange
().
expectStatus
().
isOk
()
.
expectBody
().
jsonPath
(
"All"
).
isEqualTo
(
true
));
}
@Test
@Test
public
void
readOperationWithSingleQueryParameters
()
{
public
void
readOperationWithSingleQueryParameters
()
{
load
(
QueryEndpointConfiguration
.
class
,
load
(
QueryEndpointConfiguration
.
class
,
...
...
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