Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Spring Boot :: Custom Spring Boot Actuator endpoints

This example show how you can add custom Spring Boot application insight: As endpoints to the Spring Boot Actuator system.

Try it out


./gradlew clean bootRun 

Open a browser at: http://localhost:8080/actuator/usersessions

Notice that there are no active sessions. Let's change that:

Open a new browser window/tab at: http://localhost:8080/greetings/java

You'll be prompted for a username / password. Provide: username=duke, password=duke

Repeat the process - open another browser window in private mode. Provide: username=tux, password=tux

Refresh: http://localhost:8080/actuator/usersessions

Notice that it shows the user sessions.

The information you've just seen comes from a custom Spring Boot Actuator HTTP endpoint. That's easy to develop: checkout the source code.

You can’t perform that action at this time.