From 35f39e513055e43399d310e1128c6116156b30a2 Mon Sep 17 00:00:00 2001 From: Tom Winter Date: Wed, 17 Apr 2024 20:33:24 +0200 Subject: [PATCH] feat: add HelloFriendController for root route --- .../com/aamdigital/aambackendservice/Application.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/Application.kt b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/Application.kt index d2ecaca..50e5d68 100644 --- a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/Application.kt +++ b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/Application.kt @@ -4,6 +4,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.context.properties.ConfigurationPropertiesScan import org.springframework.boot.runApplication import org.springframework.scheduling.annotation.EnableScheduling +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RestController @SpringBootApplication @ConfigurationPropertiesScan @@ -13,3 +15,12 @@ class Application fun main(args: Array) { runApplication(*args) } + +@RestController +class HelloFriendController { + @GetMapping("/") + @Suppress("FunctionOnlyReturningConstant") + fun helloFriend(): String { + return "Hello, Friend. This is aam-backend-service." + } +}