Working with Spring REST | RESTful Services with Spring

Spring REST focuses on providing an understanding of the fundamental principles and technologies that are used in the development of RESTful services and clients. This understanding is critical to being able to diagnose, troubleshoot, tune, and perform other lifecycle activities. Working with Spring REST is a two-day, fast-paced coding course geared for experienced developers who have prior working knowledge of Java. Throughout the course students learn the best practices for writing Restful services in Java using Spring Boot. The course provides an in-depth view of the APIs provided by Spring to develop both the REST service and the REST client.

Retail Price: $1,795.00

Next Date: Request Date

Course Days: 2


Request a Date

Request Custom Course


Course Objectives

This “skills-centric” course is about 50% hands-on lab and 50% lecture, designed to train attendees in core Cucumber and web testing skills, coupling the most current, effective techniques with the soundest industry practices. Working within in an engaging, hands-on learning environment, guided by our expert team, attendees will:

  • Learn the request-response cycle of REST requests
  • Implement a REST controller using Spring
  • Map URLs to service endpoints
  • Use Spring's template class to develop a REST client
  • Bootstrap a Spring REST applications
  • Return different media types for a service
  • Setting the response headers
  • Discuss Exceptions and HTTP Status codes
  • Handle exceptions thrown by a service

 

Course Prerequisites

This in an intermediate-level Java development course geared for students experienced with Java and Spring programming essentials.  This course does not cover Java or Spring development basics.


Course Agenda

 

Please note that this list of topics is based on our standard course offering, evolved from typical industry uses and trends. We’ll work with you to tune this course and level of coverage to target the skills you need most.

Session: Implementing REST with Spring

Lesson: REST principles

  • Introduce the six architectural constraints of REST
  • Introduce Resources and Resource representations
  • Best practices for defining Resource URIs
  • Tutorial: Setup Eclipse for Using Maven

Lesson: Introduction to RESTful Services in Spring

  • Discuss the request-response cycle of REST requests
  • Defining a REST Controller in Spring
  • Explain the @ResponseBody annotation
  • Define request mappings
  • Use path variables
  • Lab: Working with Spring REST

Lesson: Introduction to REST Clients in Spring

  • Introduce RestTemplate class
  • Making GET, POST, PUT, HEAD, OPTIONS and DELETE requests
  • Introduce the UriTemplate class
  • Using HttpEntity and RequestEntity
  • Use the exchange method to define ‘complex’ requests
  • Process requests and responses using callback
  • Configure the RestTemplate
  • Lab: Implementing the Spring REST Client

Lesson: Bootstrapping the REST application

  • Describe steps needed to bootstrap Spring REST application
  • Configure Content Representation libraries
  • Configure Spring MVC and map the Dispatcher Servlet
  • Explain the advantages of using Spring Boot to setup the REST project
  • Setup a Spring REST application using Spring Boot
  • Lab: Spring Hotel Reservation
  • Lab: Spring Hotel Reservation Client

Lesson: Content Representation

  • Returning different media types from service
  • Introduce negotiated resource representation
  • Configure Message Converters
  • Lab: Spring REST Content Negotiation

Lesson: Implementing the REST Service

  • Process for Spring REST Implementation
  • The Domain object
  • Using Project Lombok to define the domain object
  • (Not) Using Data Transfer Objects
  • ResponseEntity builder interfaces
  • Setting Location header using UriComponentsBuilder
  • Lab: Spring REST Services

Lesson: Error Handling

  • Handling Exceptions and HTTP Status codes
  • Using @ResponseStatus
  • Exception handler methods in controller
  • Using Controller advices to handle exception
  • The ResponseStatusException class
  • Lab: Spring REST Exceptions

Session: Security and RESTful Services

Lesson: Securing Untrusted Input

  • Input Data Attacks
  • Protecting a Web Service
  • Tenacious D
  • Responding to Error State

Lesson: Defending RESTful Services

  • How Attackers See REST
  • Factors that Increase Attack Surface
  • Data Tampering
  • Cross Site Scripting
  • Bridging and its potential Problems
  • Dangerous Developer Assumptions
  • Three Basic Tenets for Safe RESTfulness


Sorry! It looks like we haven’t updated our dates for the class you selected yet. There’s a quick way to find out. Contact us at 502.265.3057 or email info@training4it.com


Request a Date