Restful web services with Spring MVC tutorial

Developing RESTful Java Web Services using Spring boot

This course enables you to quickly get started with Spring boot applications.

Restful web services

What you’ll learn

You will be able to get started with a spring boot application easily

You will be able to create a Customer Rest Controller

You will be able to get customers data for our application in SQL

You will be able to set up an H2 database server with customer data

You will be able to map Customer class to customers table using JPA

You will be able to get data from DB in our rest controller using Spring Data JPA

You will be able to get paginated data using our web API

You will be able to download, install and use Postman for making requests

You will be able to get customer data based on id using the path variable

You will be able to add new customers using HTTP POST request

You will be able to update customer data using an HTTP PUT request

You will be able to delete a customer data using an HTTP DELETE request

You will be able to add Swagger for API Documentation

You will be able to build a distributable bundle for production

This course enables a regular Java developer with the power and simplicity of Spring boot applications. Via this course, you will understand the basic concepts of RESTful web services and how Spring boot simplifies the development of a standalone, self-contained web service using which you can quickly develop and deploy production-ready Java microservices. For taking this course, you DO NOT need to have prior knowledge of the Spring framework.

Here is what you can read about Spring boot and a basic comparison of Spring framework and Spring boot.

Spring Boot makes it easy to create stand-alone, production-grade Spring-based Applications that you can “just run”.

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 very little Spring configuration.


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

What is the difference between Spring Boot and the Spring framework?

Spring is a lightweight and open-source framework created by Rod Johnson in 2003. Spring is a complete and a modular framework, I mean spring framework can be used for all layer implementations for a real-time application, or spring can be used for the development of a particular layer of a real-time application unlike struts [ only for front end related ] and hibernate [ only for database related ], but with spring we can develop all layers

Spring framework is said to be a non-invasive means it doesn’t force a programmer to extend or implement their class from any predefined class or interface given by Spring API, in struts we used to extend Action Class right that’s why struts are said to be invasive

In the case of the struts framework, it will force the programmer that, the programmer class must extend from the base class provided by struts API

Spring is a lightweight framework because of its POJO model

Spring Framework made J2EE application development a little easier, by introducing the POJO model

Spring has this much demand because of the following 3 reasons….

  • Simplicity
  • Testability
  • Loose Coupling

Spring boot:

first of all Spring Boot is not a framework, it is a way to ease create stand-alone applications with minimal or zero configurations. It is an approach to developing spring-based applications with very less configuration. It provides defaults for code and annotation configuration to quick-start new spring projects within no time. Spring Boot leverages existing spring projects as well as Third-party projects to develop production-ready applications. It provides a set of Starter Pom’s or Gradle build files that one can use to add required dependencies and also facilitate auto-configuration.

Spring Boot automatically configures required classes depending on the libraries on its classpath. Suppose your application wants to interact with DB, if there are Spring Data libraries on the classpath then it automatically sets up a connection to DB along with the Data Source class.

It is very easy to develop Spring Based applications with Java or Groovy.

Spring Boot reduces lots of development time and increases productivity.

It avoids writing lots of boilerplate Code, Annotations, and XML Configuration.

It is very easy to integrate Spring Boot Application with its Spring Ecosystem like Spring JDBC, Spring ORM, Spring Data, Spring Security, etc.

Spring Boot follows the “Opinionated Defaults Configuration” Approach to reducing Developer effort

It provides Embedded HTTP servers like Tomcat, Jetty, etc. to develop and test our web applications very easily.

It provides CLI (Command Line Interface) tool to develop and test Spring Boot (Java or Groovy) Applications from a command prompt very easily and quickly.

Spring Boot provides lots of plugins to develop and test Spring Boot Applications very easily using Build Tools like Maven and Gradle

It provides lots of plugins to work with embedded and in-memory Databases very easily.


Download File

Leave a Reply

Your email address will not be published. Required fields are marked *