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
fa02c017
Commit
fa02c017
authored
Sep 26, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
bff39e95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
EndpointWebMvcChildContextConfiguration.java
...utoconfigure/EndpointWebMvcChildContextConfiguration.java
+5
-5
EndpointWebMvcAutoConfigurationTests.java
...e/autoconfigure/EndpointWebMvcAutoConfigurationTests.java
+6
-5
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcChildContextConfiguration.java
View file @
fa02c017
...
...
@@ -85,14 +85,14 @@ public class EndpointWebMvcChildContextConfiguration {
this
.
managementServerProperties
=
BeanFactoryUtils
.
beanOfTypeIncludingAncestors
(
this
.
beanFactory
,
ManagementServerProperties
.
class
);
this
.
server
=
BeanFactoryUtils
.
beanOfTypeIncludingAncestors
(
this
.
beanFactory
,
ServerProperties
.
class
);
this
.
server
=
BeanFactoryUtils
.
beanOfTypeIncludingAncestors
(
this
.
beanFactory
,
ServerProperties
.
class
);
}
// Customize as per the parent context first (so e.g. the access logs go to the same place)
// Customize as per the parent context first (so e.g. the access logs go to
// the same place)
server
.
customize
(
container
);
// Then reset the error pages
container
.
setErrorPages
(
Collections
.<
ErrorPage
>
emptySet
());
container
.
setErrorPages
(
Collections
.<
ErrorPage
>
emptySet
());
// and add the management-specific bits
container
.
setPort
(
this
.
managementServerProperties
.
getPort
());
container
.
setAddress
(
this
.
managementServerProperties
.
getAddress
());
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfigurationTests.java
View file @
fa02c017
...
...
@@ -223,7 +223,8 @@ public class EndpointWebMvcAutoConfigurationTests {
assertThat
(
localServerPort
,
notNullValue
());
assertThat
(
localManagementPort
,
notNullValue
());
assertThat
(
localServerPort
,
not
(
equalTo
(
localManagementPort
)));
assertThat
(
applicationContext
.
getBean
(
ServerPortConfig
.
class
).
getCount
(),
equalTo
(
2
));
assertThat
(
this
.
applicationContext
.
getBean
(
ServerPortConfig
.
class
).
getCount
(),
equalTo
(
2
));
this
.
applicationContext
.
close
();
assertAllClosed
();
}
...
...
@@ -305,11 +306,11 @@ public class EndpointWebMvcAutoConfigurationTests {
@Configuration
public
static
class
ServerPortConfig
{
private
int
count
=
0
;
public
int
getCount
()
{
return
count
;
return
this
.
count
;
}
@Bean
...
...
@@ -317,7 +318,7 @@ public class EndpointWebMvcAutoConfigurationTests {
ServerProperties
properties
=
new
ServerProperties
()
{
@Override
public
void
customize
(
ConfigurableEmbeddedServletContainer
container
)
{
count
++;
ServerPortConfig
.
this
.
count
++;
super
.
customize
(
container
);
}
};
...
...
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