Skip to main content

Posts

Showing posts from September, 2025

Spring Boot Hello World Tutorial - GetMapping REST API

Learn How to get started with Spring boot framework. Create your very first REST API using Spring Boot and the @RestController  @GetMapping annotation. Whether you're new to Java development or just getting started with Spring Boot, this step-by-step guide will help you understand the core concepts and build a simple "Hello World" RESTful API. Go to Spring Initializer  https://start.spring.io/ and fill out the following details similar to below image and add Spring web dependency HelloController.java - Create new package and new class and add the following code into that class package com.hakeemit.hello.controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { @GetMapping("/hello") public String hello(){ return "Hello World"; } } Your project structure will look like this  Once you run the application. Go ...