Spring Boot Tutorial

Spring Boot DELETE REST API – @DeleteMapping Annotation

Introduction In this chapter, we will cover the @DeleteMapping annotation in Spring Boot. The @DeleteMapping annotation is used to handle HTTP DELETE requests, which are typically used for deleting existing resources. We will create endpoints to delete resources using this annotation, focusing on the Employee entity as our primary example. Understanding @DeleteMapping Annotation What is …

Spring Boot DELETE REST API – @DeleteMapping Annotation Read More »

Spring Boot PUT REST API – @PutMapping Annotation

Introduction In this chapter, we will cover the @PutMapping annotation in Spring Boot. The @PutMapping annotation is used to handle HTTP PUT requests, which are typically used to update existing resources. We will create endpoints to update resources using this annotation, focusing on the Employee entity as our primary example. Understanding @PutMapping Annotation What is …

Spring Boot PUT REST API – @PutMapping Annotation Read More »

Spring Boot POST REST API – @PostMapping and @RequestBody

Introduction In this chapter, we will cover the @PostMapping and @RequestBody annotations in Spring Boot. The @PostMapping annotation is used to handle HTTP POST requests, while the @RequestBody annotation is used to bind the request body to a method parameter. We will create endpoints to create resources using these annotations, focusing on the Employee entity …

Spring Boot POST REST API – @PostMapping and @RequestBody Read More »

Spring Boot GET REST API – @GetMapping Annotation

Introduction In this chapter, we will cover everything about the @GetMapping annotation in Spring Boot. @GetMapping Annotation Overview What is @GetMapping? The @GetMapping annotation in Spring Boot is used to create a mapping between HTTP GET requests and handler methods in a controller. It is a specialized version of the @RequestMapping annotation that is specifically …

Spring Boot GET REST API – @GetMapping Annotation Read More »

Spring Boot REST API with Request Param – @RequestParam Annotation

Introduction In this chapter, we will explore how to create a Spring Boot REST API that uses the @RequestParam annotation to handle query parameters. Query parameters are a common way to pass data to REST endpoints, especially for filtering, sorting, or paginating results. We will continue from the previous chapters and extend our StudentController to …

Spring Boot REST API with Request Param – @RequestParam Annotation Read More »

Spring Boot REST API with Path Variable – @PathVariable

Introduction This chapter will continue from the previous chapter, where we created a Spring Boot REST API that returns a list of Java Beans as JSON. We will now learn how to use the @PathVariable annotation to create a REST API that can accept and handle path variables. @PathVariable Annotation Overview What is @PathVariable? The …

Spring Boot REST API with Path Variable – @PathVariable Read More »

Spring Boot REST API Returns Java Bean (JSON)

Introduction In this chapter, we will build the Spring Boot REST API that returns a Java Bean in JSON format. This is a common requirement for building web services that return the JSON to the client. Setting Up the Project Using Spring Initializr Open Spring Initializr: Navigate to Spring Initializr in your web browser. Configure …

Spring Boot REST API Returns Java Bean (JSON) Read More »

Running Spring Boot App from Command Line

Introduction In this chapter, we will learn how to run the Spring Boot application from the command line. Running your application from the command line can be useful for testing, deployment, and automation purposes. Prerequisites Before you can run your Spring Boot application from the command line, ensure that you have the following installed and …

Running Spring Boot App from Command Line Read More »

Spring Boot Thymeleaf Hello World Example

Introduction In this chapter, we will create a simple “Hello World” web application using Spring Boot and Thymeleaf. Thymeleaf is a popular templating engine for Java applications, especially for web applications. It integrates seamlessly with Spring Boot to produce dynamic web pages. Tools and Technologies Used Java 21 Spring Boot 3.2 Thymeleaf IntelliJ IDEA Maven …

Spring Boot Thymeleaf Hello World Example Read More »

Spring Boot @SpringBootApplication Annotation

Introduction In this chapter, we will explore the @SpringBootApplication annotation. This annotation simplifies the configuration of Spring Boot applications by combining several annotations into one, making the setup process easier. The class annotated with @SpringBootApplication is the main entry point of a Spring Boot application, and the execution starts from this class. What is @SpringBootApplication? …

Spring Boot @SpringBootApplication Annotation Read More »

Spring Boot Embedded Servers

Introduction In this chapter, we will explore Spring Boot Embedded Servers, which are integral to creating stand-alone, production-grade Spring applications. Embedded servers allow you to run your Spring Boot applications without the need for an external server setup, simplifying the deployment and development processes. What are Spring Boot Embedded Servers? Spring Boot Embedded Servers are …

Spring Boot Embedded Servers Read More »

Spring Boot Parent Starter

Introduction In this chapter, we will explore the Spring Boot Parent Starter, a crucial component in managing dependencies and configurations in Spring Boot projects. The Parent Starter simplifies dependency management by providing a common base configuration that ensures consistency across Spring Boot applications. What is the Spring Boot Parent Starter? The Spring Boot Parent Starter …

Spring Boot Parent Starter Read More »

Spring Boot Auto-Configuration

Introduction In this chapter, we will explain Spring Boot Auto-Configuration in simple words. Auto-Configuration is one of the most powerful and convenient features of Spring Boot, enabling developers to get started with minimal setup and configuration. What is Spring Boot Auto-Configuration? Spring Boot Auto-Configuration is a mechanism that automatically configures your Spring application based on …

Spring Boot Auto-Configuration Read More »

Create and Setup Your First Spring Boot App in IntelliJ IDEA (using Spring Initializr)

Introduction In this chapter, we will guide you through the process of creating and setting up your first Spring Boot application using IntelliJ IDEA and Spring Initializr. IntelliJ IDEA is a powerful and popular Integrated Development Environment (IDE) that offers comprehensive support for Spring Boot, making it easier for developers to build and manage their …

Create and Setup Your First Spring Boot App in IntelliJ IDEA (using Spring Initializr) Read More »

Different Ways to Create Spring Boot Projects

Introduction In this chapter, we will explore the various methods to create Spring Boot projects. Each method has its advantages and is suited to different development workflows and preferences. 1. Using Spring Initializr What is Spring Initializr? Spring Initializr is a web-based tool that simplifies the process of bootstrapping a new Spring Boot project. It …

Different Ways to Create Spring Boot Projects Read More »

Setting Up the Environment for Spring Boot

Introduction In this chapter, we will guide you through the process of setting up your development environment for Spring Boot. Required Tools To get started with Spring Boot, you need to have the following tools installed on your system: Java Development Kit (JDK) Integrated Development Environment (IDE) Build Tool (Maven or Gradle) Spring Boot CLI …

Setting Up the Environment for Spring Boot Read More »

Spring vs Spring Boot

Introduction Spring provides a comprehensive programming and configuration model for modern Java-based enterprise applications; Spring Boot builds on top of Spring to simplify the development process by reducing the need for boilerplate code and configuration. This chapter will explore the key differences between Spring and Spring Boot, helping you understand when and why to use …

Spring vs Spring Boot Read More »

Why Spring Boot

Introduction The Spring Framework is a powerful framework for building enterprise Java applications, but it can be complex and challenging to work with. Common issues include the need for extensive configuration, managing dependencies, deployment complexities, and handling boilerplate code. Spring Boot was created to solve these problems, making it easier for developers to build, run, …

Why Spring Boot Read More »

Scroll to Top