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

Add spring actuator health check #72

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

Frontend of the application is developed separately.

The setup requires following steps:
The setup requires the following steps:
1) configure the application according to [Setup Guide](setup.md)
2) configure `config.properties` to contain `security.sameSite=None`
This is important if you are running the application over http so
This is important if you are running the application over HTTP so
web browser would not block requests to the server due to CORS policy.
3) build the backend `mvn clean package`
4) Run the created application archive (`./target/record-manager.jar`)
5) Checkout and run frontend

Alternatively to step 2, a browser plugin can be used to disable CORS policy.

## Health check

To check that the backend is running, use path `/actuator/health` (e.g. `http://localhost:8080/record-manager/actuator/health`).
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>

<!-- Health check -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
server.servlet.context-path=/record-manager
server.servlet.context-path=/record-manager
management.endpoints.web.exposure.include=health
Loading