Working with Spring REST | Restful Services in Spring (TT3358) Course Details:

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.

    No classes are currenty scheduled for this course.

    Call (919) 283-1674 to get a class scheduled online or in your area!

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

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

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

Lesson: Content Representation

  • Returning different media types from service
  • Introduce negotiated resource representation
  • Configure Message Converters

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

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

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

*Please Note: Course Outline is subject to change without notice. Exact course outline will be provided at time of registration.

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

This hands-on course focuses on ‘learning by doing’, combining expert lecture, practical demonstrations and group discussions with plenty of machine-based real-world programming labs and exercises. Student machines are required.

This in an intermediate-level development course geared for students experienced with Java and Spring programming essentials. In order to be successful in the hands-on portion of the training, you should have incoming practical, hands-on prior experience working with basic Spring concepts and development skills (or attended the suggested pre-requisite courses listed below). This course does not cover Java or Spring development basics.

Java Developers, Application Developers, Full Stack Developers, Technical Managers, Architects.

Ready to Jumpstart Your IT Career?

CONTACT US NOW!