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
e1479a02
Commit
e1479a02
authored
Jul 20, 2015
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish
Use canonical version for the management's context path.
parent
1bf0abc4
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
18 additions
and
18 deletions
+18
-18
index.adoc
spring-boot-actuator-docs/src/main/asciidoc/index.adoc
+8
-8
application.properties
...t-actuator-docs/src/test/resources/application.properties
+1
-1
ManagementAddressActuatorApplicationTests.java
...e/actuator/ManagementAddressActuatorApplicationTests.java
+1
-1
application-endpoints.properties
...uator/src/test/resources/application-endpoints.properties
+1
-1
application.properties
...hypermedia-gson/src/main/resources/application.properties
+1
-1
application.properties
...-hypermedia-jpa/src/main/resources/application.properties
+1
-1
SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests.java
...ermediaJpaApplicationCustomLinksPathIntegrationTests.java
+1
-1
SampleHypermediaJpaApplicationSharedRootIntegrationTests.java
...leHypermediaJpaApplicationSharedRootIntegrationTests.java
+1
-1
application.properties
...e-hypermedia-ui/src/main/resources/application.properties
+1
-1
SampleHypermediaUiApplicationTests.java
...ple/hypermedia/ui/SampleHypermediaUiApplicationTests.java
+1
-1
application.properties
...mple-hypermedia/src/main/resources/application.properties
+1
-1
No files found.
spring-boot-actuator-docs/src/main/asciidoc/index.adoc
View file @
e1479a02
...
...
@@ -54,7 +54,7 @@ Example enhanced "/metrics" endpoint with additional "_links":
include::{generated}/metrics/hypermedia/http-response.adoc[]
WARNING: Beware of Actuator endpoint paths clashing with application endpoints.
The easiest way to avoid that is to use a `management.context
P
ath`, e.g. "/admin".
The easiest way to avoid that is to use a `management.context
-p
ath`, e.g. "/admin".
TIP: You can disable the hypermedia support in Actuator endpoints by setting
`endpoints.links.enabled=false`.
...
...
@@ -62,13 +62,13 @@ TIP: You can disable the hypermedia support in Actuator endpoints by setting
=== Default home page
If the `management.context
P
ath` is empty, or if the home page provided by the application
If the `management.context
-p
ath` is empty, or if the home page provided by the application
happens to be a response body of type `ResourceSupport`, then it will be enhanced with
links to the actuator endpoints. The latter would happen for instance if you use Spring
Data REST to expose `Repository` endpoints.
Example vanilla "/" endpoint if the `management.context
P
ath` is empty (the "/admin" page
would be the same with different links if `management.context
P
ath=/admin`):
Example vanilla "/" endpoint if the `management.context
-p
ath` is empty (the "/admin" page
would be the same with different links if `management.context
-p
ath=/admin`):
include::{generated}/admin/http-response.adoc[]
...
...
@@ -115,10 +115,10 @@ NOTE: if you are using Spring Data REST, then a dependency on the
`spring-data-rest-hal-browser` will have an equivalent effect.
If you do that then a new endpoint will appear at `/` or `/hal` (relative to the
`management.context
P
ath`) serving up a static HTML page with some JavaScript that lets you
`management.context
-p
ath`) serving up a static HTML page with some JavaScript that lets you
browse the available resources. The default endpoint path depends on whether or not there
is already a static home page ("`index.html`") - if there is not and the
`management.context
P
ath` is empty, then the HAL browser shows up on the home page.
`management.context
-p
ath` is empty, then the HAL browser shows up on the home page.
Example:
...
...
@@ -155,7 +155,7 @@ or in Gradle
----
If you do that then a new endpoint at `/` or `/docs` (relative to the
`management.context
P
ath`) will serve up a static HTML page with this documentation in it.
`management.context
-p
ath`) will serve up a static HTML page with this documentation in it.
The default endpoint path depends on whether or not there is already a static home page
("index.html" or a HAL browser) - if there is not and the `management.context
P
ath` is
("index.html" or a HAL browser) - if there is not and the `management.context
-p
ath` is
empty, then the docs browser shows up on the home page.
spring-boot-actuator-docs/src/test/resources/application.properties
View file @
e1479a02
# management.context
P
ath=/admin
# management.context
-p
ath=/admin
logging.path
:
target/logs
\ No newline at end of file
spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/ManagementAddressActuatorApplicationTests.java
View file @
e1479a02
...
...
@@ -44,7 +44,7 @@ import static org.junit.Assert.assertTrue;
@SpringApplicationConfiguration
(
classes
=
SampleActuatorApplication
.
class
)
@WebAppConfiguration
@IntegrationTest
({
"server.port=0"
,
"management.port=0"
,
"management.address=127.0.0.1"
,
"management.context
P
ath:/admin"
})
"management.context
-p
ath:/admin"
})
@DirtiesContext
public
class
ManagementAddressActuatorApplicationTests
{
...
...
spring-boot-samples/spring-boot-sample-actuator/src/test/resources/application-endpoints.properties
View file @
e1479a02
error.path
:
/oops
management.context
P
ath
:
/admin
management.context
-p
ath
:
/admin
endpoints.health.sensitive
:
false
\ No newline at end of file
spring-boot-samples/spring-boot-sample-hypermedia-gson/src/main/resources/application.properties
View file @
e1479a02
# management.context
P
ath=/admin
# management.context
-p
ath=/admin
spring.http.converters.preferred-json-mapper
:
gson
\ No newline at end of file
spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/main/resources/application.properties
View file @
e1479a02
management.context
P
ath
=
/admin
management.context
-p
ath
=
/admin
endpoints.docs.curies.enabled
=
true
\ No newline at end of file
spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests.java
View file @
e1479a02
...
...
@@ -40,7 +40,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@WebAppConfiguration
@SpringApplicationConfiguration
(
classes
=
SampleHypermediaJpaApplication
.
class
)
@DirtiesContext
@TestPropertySource
(
properties
=
{
"debug=true"
,
"management.context
P
ath="
,
@TestPropertySource
(
properties
=
{
"debug=true"
,
"management.context
-p
ath="
,
"endpoints.docs.curies.enabled=false"
})
public
class
SampleHypermediaJpaApplicationCustomLinksPathIntegrationTests
{
...
...
spring-boot-samples/spring-boot-sample-hypermedia-jpa/src/test/java/sample/hypermedia/jpa/SampleHypermediaJpaApplicationSharedRootIntegrationTests.java
View file @
e1479a02
...
...
@@ -41,7 +41,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@SpringApplicationConfiguration
(
classes
=
SampleHypermediaJpaApplication
.
class
)
@DirtiesContext
@TestPropertySource
(
properties
=
{
"endpoints.links.path=/admin"
,
"management.context
P
ath="
,
"endpoints.docs.curies.enabled=false"
})
"management.context
-p
ath="
,
"endpoints.docs.curies.enabled=false"
})
public
class
SampleHypermediaJpaApplicationSharedRootIntegrationTests
{
@Autowired
...
...
spring-boot-samples/spring-boot-sample-hypermedia-ui/src/main/resources/application.properties
View file @
e1479a02
management.contextPath
=
/admin
\ No newline at end of file
management.context-path
=
/admin
\ No newline at end of file
spring-boot-samples/spring-boot-sample-hypermedia-ui/src/test/java/sample/hypermedia/ui/SampleHypermediaUiApplicationTests.java
View file @
e1479a02
...
...
@@ -39,7 +39,7 @@ import static org.junit.Assert.assertTrue;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleHypermediaUiApplication
.
class
)
@WebAppConfiguration
@IntegrationTest
({
"management.context
P
ath="
,
"server.port=0"
})
@IntegrationTest
({
"management.context
-p
ath="
,
"server.port=0"
})
public
class
SampleHypermediaUiApplicationTests
{
@Value
(
"${local.server.port}"
)
...
...
spring-boot-samples/spring-boot-sample-hypermedia/src/main/resources/application.properties
View file @
e1479a02
# management.context
P
ath=/admin
# management.context
-p
ath=/admin
endpoints.docs.curies.enabled
=
true
\ No newline at end of file
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