diff --git a/src/main/java/com/app/botblend/contoller/HealthcheckController.java b/src/main/java/com/app/botblend/contoller/HealthcheckController.java new file mode 100644 index 0000000..bb4b217 --- /dev/null +++ b/src/main/java/com/app/botblend/contoller/HealthcheckController.java @@ -0,0 +1,17 @@ +package com.app.botblend.contoller; + +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Tag(name = "Healthcheck endpoint", + description = "Healthcheck controller for reporting the health of app") +@RestController +@RequestMapping("/healthcheck") +public class HealthcheckController { + @GetMapping + public String check() { + return "The Botblend API is running stably"; + } +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 1088a21..32dd52c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,6 +1,6 @@ -spring.datasource.url=jdbc:postgresql://localhost:5432/botblend -spring.datasource.username=postgres -spring.datasource.password=test1234 +spring.datasource.url=${DATABASE_URL} +spring.datasource.username=${DATABASE_USERNAME} +spring.datasource.password=${DATABASE_PASSWORD} spring.jpa.hibernate.ddl-auto=validate spring.jpa.open-in-view=false