by BehindJava

Beginner tutorial on building and running RESTful Web Services with HTTP CRUD operations using Spring Boot

Home » springboot » Beginner tutorial on building and running RESTful Web Services with HTTP CRUD operations using Spring Boot

In this tutorial we are going to learn about RESTful Web Services and implementing them with the best practices and perform basic crud operations on user details like create, read, update and delete.

These are the important topics that must be covered while preparing for a Java interview on Spring Boot and Restful web services.

Upon completion of this course, who have never build RESTful Web Services. It will guide you step-by-step through basics and will help you create and run RESTful Web Services from scratch.

What is SpringBoot?

Spring Boot is a project that is built on the top of the Spring Framework. It provides an easier and faster way to set up, configure, and run both simple and web-based applications.

It is a Spring module that provides the RAD (Rapid Application Development) feature to the Spring Framework. It is used to create a stand-alone Spring-based application that you can just run because it needs minimal Spring configuration.

spring

In short, Spring Boot is the combination of Spring Framework and Embedded Servers.

In Spring Boot, there is no requirement for XML configuration (deployment descriptor). It uses convention over configuration software design paradigm that means it decreases the effort of the developer.

We can use Spring STS IDE or Spring Initializr to develop Spring Boot Java applications.

We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need minimal Spring configuration.

If you’re looking for information about a specific version, or instructions about how to upgrade from an earlier release, check out the project release notes section on our wiki.

Features

  • Create stand-alone Spring applications
  • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
  • Provide opinionated ‘starter’ dependencies to simplify your build configuration
  • Automatically configure Spring and 3rd party libraries whenever possible
  • Provide production-ready features such as metrics, health checks, and externalized configuration
  • Absolutely no code generation and no requirement for XML configuration

Spring Boot Advantages

  • Simplified & version conflict free dependency management through the starter POMs.
  • We can quickly setup and run standalone, web applications and micro services at very less time.
  • You can just assemble the jar artifact which comes with an embedded Tomact, Jetty or Undertow application server and you are ready to go.
  • Spring Boot provides HTTP endpoints to access application internals like detailed metrics, application inner working, health status, etc. -No XML based configurations at all. Very much simplified properties. The beans are initialized, configured and wired automatically.
  • The Spring Initializer provides a project generator to make you productive with the certain technology stack from the beginning. You can create a skeleton project with web, data access (relational and NoSQL datastores), cloud, or messaging support.

Spring Boot Disadvantages

  • Spring boot may unnecessarily increase the deployment binary size with unused dependencies.
  • If you are a control freak, I doubt Spring Boot would fit your needs.
  • Spring Boot sticks good with micro services. The Spring Boot artifacts can be deployed directly into Docker containers. In a large and monolithic based applications, I would not encourage you to use Spring Boot.

Table of Contents