Master Java Web Services and REST API with Spring Boot

Video description

Learn to develop RESTful and SOAP Java web services with Spring and Spring Boot in 90 easy steps

About This Video

  • Great tutorial and easy to understand Very suitable for programmers moving to Spring Boot, especially if you are moving to microservices.

In Detail

Developing SOAP and RESTful web services is fun. The combination of Spring Boot, Spring Web MVC, Spring web services, and JPA makes it even more fun. Architectures are moving towards Microservices. RESTful web services are the first step to developing great Microservices. Spring Boot, in combination with Spring Web MVC (also called Spring REST) makes it easy to develop RESTful web services. There are two parts to this course: RESTful web services and SOAP web services. In the first part of the course, you will learn the basics of RESTful web services developing resources for a social media application. You will learn to implement these resources with multiple features such as versioning, exception handling, documentation (Swagger), basic authentication (Spring Security), filtering and HATEOAS. You will learn the best practices in designing RESTful web services. You will be using Spring (dependency management), Spring MVC (or Spring REST), Spring Boot, Spring Security (authentication and authorization), Spring Boot Actuator (monitoring), Swagger (Documentation), Maven (dependencies management), Eclipse (IDE), Postman (REST services client), and the Tomcat embedded web server. We will help you set up each one of these. While the use of SOAP web services is on the way down, there are still a considerable number of web services using this approach. In the second part of the course, you will learn the basics of implementing SOAP web services by developing a few web services for a course management application. You will learn to use a contract first approach, defining XSD (XML Schema Definition) for your requests and responses. You will learn about WSDL (SOAP header, SOAP body and SOAP fault), XSD (XML schema definition) and JAXB (Java API for XML binding). You will implement three SOAP web services with exception handling and basic security (with WS security). In this part of the course, you will be using Spring (dependency management), Spring web services , Spring Boot, Spring Security (authentication and authorization), Swagger (documentation), Maven (dependencies management), Eclipse (IDE), Wizdler (SOAP services Chrome Plugin), and the Tomcat embedded web server. We will help you set up each one of these.

Who this book is for

You want to learn the basics of Web Services and learn the terminology associated with web services. You want to learn to develop and design RESTful web services and learn to develop and design SOAP web services. You have good experience with Java and want to see what else you can do with Java. You have good experience with Spring and want to use that knowledge.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Getting Started
    1. Introduction
    2. Introduction to Course Course Guide
  2. Chapter 2 : Introduction to Web Services
    1. Introduction to Web Services - An Overview
    2. What is a Web Service?
    3. Important How Questions related to Web Services
    4. Web Services - Key Terminology
    5. Introduction to SOAP Web Services
    6. Introduction to RESTful Web Services
    7. SOAP vs RESTful Web Services
  3. Chapter 3 : Introduction to Spring Framework in 10 Steps
    1. First 10 Steps in Spring- An Overview
    2. Step 1: Setting up a Spring Project using htttp://start.spring.io
    3. Step 2: Understanding Tight Coupling using the Binary Search Algorithm Example
    4. Step 3: Making the Binary Search Algorithm Example Loosely Coupled
    5. Step 4: Using Spring to Manage Dependencies - @Component, @Autowired
    6. Step 5: What is happening in the background?
    7. Step 6: Dynamic auto wiring and Troubleshooting - @Primary
    8. Step 7: Constructor and Setter Injection
    9. Step 8: Spring Modules
    10. Step 9: Spring Projects
    11. Step 10: Why is Spring Popular?
  4. Chapter 4 : Introduction to Spring Boot in 10 Steps
    1. First 10 Steps in Spring Boot - An Overview
    2. Step 1: Introduction to Spring Boot - Goals and Important Features
    3. Step 2: Developing Spring Applications before Spring Boot
    4. Step 3: Using Spring Initializr to create
    5. Step 4: Creating a Simple REST Controller
    6. Step 5: What is Spring Boot Auto Configuration?
    7. Step 6: Spring Boot vs Spring vs Spring MVC
    8. Step 7: Spring Boot Starter Projects - Starter Web and Starter JPA
    9. Step 8: Overview of different Spring Boot Starter Projects
    10. Step 9: Spring Boot Actuator
    11. Step 10: Spring Boot Developer Tools
  5. Chapter 5 : SOAP Web Services with Spring and Spring Boot
    1. SOAP Web Services - An Overview
    2. Step 01 - Initialize a Spring Web Services application with Spring Boot
    3. Step 02 - Overview of creating SOAP Web Service using Contract First Approach
    4. Step 03 - Define Request and Response XML Structure
    5. Step 04 - Define XML Schema Definition (XSD) for Request – GetCourseDetailsReque
    6. Step 05 - Define XML Schema Definition (XSD) for Response – GetCourseDetailsResp
    7. Step 06 - More about XML Schema Definition and Implementing XSD Best Practices
    8. Step 07 - Introduction to Java API for XML Binding (JAXB) and Configuring JAXB 2
    9. Step 08 - Configuring an Endpoint for GetCourseDetailsRequest
    10. Step 09 - Spring Web Services Configuration - Message Dispatcher Servlet
    11. Step 10 - Spring Web Services Configuration - Generating WSDL
    12. Step 11 - Using Wizdler to execute SOAP Requests
    13. Step 12 - Implementing a service - Course Details Service - backend with in memo
    14. Step 13 - Implementing SOAP Web Service for GetAllCourseDetailsRequest
    15. Step 14 - Quick introduction to different parts of a WSDL
    16. Step 15 - Implementing SOAP Web Service for DeleteCourseDetailsRequest
    17. Step 16 - Improving the DeleteCourseDetailsRequest - Using an Enum for Status
    18. Step 17 - Exception Handling and SOAP Fault Responses
    19. Step 18 - Implementing Security for SOAP Web Services with WS Security
  6. Chapter 6 : RESTful Web Services with Spring and Spring Boot
    1. RESTful Web Services - An Overview
    2. Step 01 - Initializing a RESTful Services Project with Spring Boot
    3. Step 02 - Understanding the RESTful Services we would create in this course
    4. Step 03 - Creating a Hello World Service
    5. Step 04 - Enhancing the Hello World Service to return a Bean
    6. Step 05 - Quick Review of Spring Boot Auto Configuration and Dispatcher Servlet
    7. Step 06 - Enhancing the Hello World Service with a Path Variable
    8. Step 07 - Creating User Bean and User Service
    9. Step 08 - Implementing GET Methods for User Resource
    10. Step 09 - Implementing POST Method to create User Resource
    11. Step 10 - Enhancing POST Method to return correct HTTP Status Code and Location
    12. Step 11 - Implementing Exception Handling - 404 Resource Not Found
    13. Step 12 - Implementing Generic Exception Handling for all Resources
    14. Step 13 - Exercise: User Post Resource and Exception Handling
    15. Step 14 - Implementing DELETE Method to delete a User Resource
    16. Step 15 - Implementing Validations for RESTful Services
    17. Step 16 - Implementing HATEOAS for RESTful Services
    18. Step 17 - Overview of Advanced RESTful Service Features
    19. Step 18 - Internationalization for RESTful Services
    20. Step 18 - Part 2 – Internationalization
    21. Step 19 - Content Negotiation - Implementing Support for XML
    22. Step 20 - Configuring Auto Generation of Swagger Documentation
    23. Step 21 - Introduction to Swagger Documentation Format
    24. Step 22 - Enhancing Swagger Documentation with Custom Annotations
    25. Step 23 - Monitoring APIs with Spring Boot Actuator
    26. Step 24 - Implementing Static Filtering for RESTful Service
    27. Step 25 - Implementing Dynamic Filtering for RESTful Service
    28. Step 26 - Versioning RESTful Services - Basic Approach with URIs
    29. Step 27 - Versioning RESTful Services - Header and Content Negotiation Approach
    30. Step 28 - Implementing Basic Authentication with Spring Security
  7. Chapter 7 : Introduction to JPA in 10 Steps
    1. Introduction to JPA - An Overview
    2. Step 1: Object Relational Impedence Mismatch
    3. Step 2: World before JPA - JDBC, Spring JDBC and myBatis
    4. Step 3: Introduction to JPA
    5. Step 4: Creating a JPA Project using Spring Initializr
    6. Step 5: Defining a JPA Entity – User
    7. Step 6: Defining a Service to manage the Entity - UserService and EntityManager
    8. Step 7: Using a Command Line Runner to save the User to database
    9. Step 8: Magic of Spring Boot and In Memory Database H2
    10. Step 9: Introduction to Spring Data JPA
    11. Step 10: More JPA Repository: findById and findAll
  8. Chapter 8 : Connecting RESTful Web Service to JPA
    1. Step 29 - Overview of Connecting RESTful Service to JPA
    2. Step 30 - Creating User Entity and some test data
    3. Step 31 - Updating GET methods on User Resource to use JPA
    4. Step 32 - Updating POST and DELETE methods on User Resource to use JPA
    5. Step 33 - Creating Post Entity and Many to One Relationship with User Entity
    6. Step 34 - Implementing a GET service to retrieve all Posts of a User
    7. Step 35 - Implementing a POST service to create a Post for a User
  9. Chapter 9 : RESTful Web Services - Best Practices
    1. Step 36 - Richardson Maturity Model
    2. Step 37 - RESTful Web Services - Best Practices

Product information

  • Title: Master Java Web Services and REST API with Spring Boot
  • Author(s): In28Minutes Official
  • Release date: March 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789130133