From d76a6613ea22523062ece6482a401fd23e12f151 Mon Sep 17 00:00:00 2001 From: markpernia Date: Wed, 17 Jan 2024 21:14:07 +0100 Subject: [PATCH] SMA-4-Added API controller with 'hello' endpoint returning 'Hello World' string. --- .../backend/controllers/APIController.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 backend/src/main/java/com/sportsmatch/backend/controllers/APIController.java diff --git a/backend/src/main/java/com/sportsmatch/backend/controllers/APIController.java b/backend/src/main/java/com/sportsmatch/backend/controllers/APIController.java new file mode 100644 index 00000000..2238604f --- /dev/null +++ b/backend/src/main/java/com/sportsmatch/backend/controllers/APIController.java @@ -0,0 +1,15 @@ +package com.sportsmatch.backend.controllers; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("api/v1") +public class APIController { + + @GetMapping("/hello") + public String hello() { + return "Hello World"; + } +}