Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix README.adoc for Spring Boot 2.0.0.RELEASE #44

Merged
merged 1 commit into from
Mar 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix README.adoc for Spring Boot 2.0.0.RELEASE
  • Loading branch information
heowc committed Mar 17, 2018
commit 7dcfcd429197f8b79df0bfef3b4fa0325f3cee75
36 changes: 14 additions & 22 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -204,40 +204,32 @@ mvn package && java -jar target/{project_id}-0.1.0.jar
You will see a new set of RESTful end points added to the application. These are management services provided by Spring Boot.

....
2014-06-03 13:23:28.119 ... : Mapped "{[/error],methods=[],params=[],headers=[],consumes...
2014-06-03 13:23:28.119 ... : Mapped "{[/error],methods=[],params=[],headers=[],consumes...
2014-06-03 13:23:28.136 ... : Mapped URL path [/**] onto handler of type [class org.spri...
2014-06-03 13:23:28.136 ... : Mapped URL path [/webjars/**] onto handler of type [class ...
2014-06-03 13:23:28.440 ... : Mapped "{[/info],methods=[GET],params=[],headers=[],consum...
2014-06-03 13:23:28.441 ... : Mapped "{[/autoconfig],methods=[GET],params=[],headers=[],...
2014-06-03 13:23:28.441 ... : Mapped "{[/mappings],methods=[GET],params=[],headers=[],co...
2014-06-03 13:23:28.442 ... : Mapped "{[/trace],methods=[GET],params=[],headers=[],consu...
2014-06-03 13:23:28.442 ... : Mapped "{[/env/{name:.*}],methods=[GET],params=[],headers=...
2014-06-03 13:23:28.442 ... : Mapped "{[/env],methods=[GET],params=[],headers=[],consume...
2014-06-03 13:23:28.443 ... : Mapped "{[/configprops],methods=[GET],params=[],headers=[]...
2014-06-03 13:23:28.443 ... : Mapped "{[/metrics/{name:.*}],methods=[GET],params=[],head...
2014-06-03 13:23:28.443 ... : Mapped "{[/metrics],methods=[GET],params=[],headers=[],con...
2014-06-03 13:23:28.444 ... : Mapped "{[/health],methods=[GET],params=[],headers=[],cons...
2014-06-03 13:23:28.444 ... : Mapped "{[/dump],methods=[GET],params=[],headers=[],consum...
2014-06-03 13:23:28.445 ... : Mapped "{[/beans],methods=[GET],params=[],headers=[],consu...
2018-03-17 15:42:20.088 ... : Mapped "{[/error],produces=[text/html]}" onto public org.s...
2018-03-17 15:42:20.089 ... : Mapped "{[/error]}" onto public org.springframework.http.R...
2018-03-17 15:42:20.121 ... : Mapped URL path [/webjars/**] onto handler of type [class ...
2018-03-17 15:42:20.121 ... : Mapped URL path [/**] onto handler of type [class org.spri...
2018-03-17 15:42:20.157 ... : Mapped URL path [/**/favicon.ico] onto handler of type [cl...
2018-03-17 15:42:20.488 ... : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd...
2018-03-17 15:42:20.490 ... : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.s...
2018-03-17 15:42:20.491 ... : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring...
....

They include: errors, http://localhost:8080/env[environment], http://localhost:8080/health[health], http://localhost:8080/beans[beans], http://localhost:8080/info[info], http://localhost:8080/metrics[metrics], http://localhost:8080/trace[trace], http://localhost:8080/configprops[configprops], and http://localhost:8080/dump[dump].
They include: errors, http://localhost:8080/actuator/health[actuator/health], http://localhost:8080/actuator/info[actuator/info], http://localhost:8080/actuator[actuator].

NOTE: There is also a `/shutdown` endpoint, but it's only visible by default via JMX. To http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle/#production-ready-customizing-endpoints[enable it as an HTTP endpoint], add
`endpoints.shutdown.enabled=true` to your `application.properties` file.
NOTE: There is also a `/actuator/shutdown` endpoint, but it's only visible by default via JMX. To http://docs.spring.io/spring-boot/docs/{spring_boot_version}/reference/htmlsingle/#production-ready-endpoints-enabling-endpoints[enable it as an HTTP endpoint], add
`management.endpoints.shutdown.enabled=true` to your `application.properties` file.

It's easy to check the health of the app.

----
$ curl localhost:8080/health
{"status":"UP","diskSpace":{"status":"UP","total":397635555328,"free":328389529600,"threshold":10485760}}}
$ curl localhost:8080/actuator/health
{"status":"UP"}
----

You can try to invoke shutdown through curl.

----
$ curl -X POST localhost:8080/shutdown
$ curl -X POST localhost:8080/actuator/shutdown
{"timestamp":1401820343710,"error":"Method Not Allowed","status":405,"message":"Request method 'POST' not supported"}
----

Expand Down