Consulting Training Blog Careers About Us Contact Us
All Classes Will Be Held Virtually – Live Online Intertech's Training Division has been successfully instructing professionals through virtual live online training since the advent of the smartboard. It is a proven form and offers the convenience of live questions, group interaction, and labs with an instructor looking over your shoulder. Because of this, we will continue all classes live but virtually, including Agile and Scrum instruction, so businesses and individual’s seeking professional development can keep moving forward during these unexpected times.

Developing RESTful Services with Spring Training

Course ID: CC-117E
Duration: 3 Days

Upcoming Classes

Click the Get Notified button for priority notification when a class is next scheduled.

Get Notified

On Site/Private

Can't find a class that fits right for you? Contact us to inquire about scheduling your own private class

Contact Us


This course enables the experienced Java developer to use the Spring MVC framework to create RESTful web services. We begin by developing fluency with the Spring container and configuration practices, and then learn the annotation-driven MVC system for REST controllers. We consider persistence techniques and unit testing to round out the course.

Bring This Course To You

For groups of 5 or more, let Intertech bring this course to your location. Customized versions tailored towards your objectives are also available.

Learn More

Learning Objectives

  • Configure systems of Spring beans using either Java or XML.
  • Build web applications and RESTful services as a Spring DispatcherServlet and associated application context.
  • Use Spring MVC annotations to map request URLs, methods, content types, and parameters to Java methods, and to bind request data to method parameters.
  • Validate input via HTTP requests, and use exception handlers to produce appropriate HTTP error responses.
  • Build REST clients using Spring's "REST template."
  • Connect REST controllers to persistent stores using Spring for JDBC or JPA.
  • Control transactions either programmatically with TransactionTemplate or declaratively with @Transaction annotations.
  • Use the Spring testing framework for tests of core components, REST controllers, and persistence components.


  • Understanding of Spring Core - Spring Framework Core is excellent preparation.
  • Basic knowledge of XML 

Course Outline

REST Basics

  • The REST Vision
  • Use of HTTP
  • Use of URIs
  • Use of Content Types
  • CRUD Operations and Business Operations
  • Hypermedia, and the Richardson Maturity Model

The Web Module

  • Servlets and JSPs: What's Missing
  • The MVC Pattern
  • The Front Controller Pattern
  • DispatcherServlet
  • A Request/Response Cycle
  • The Strategy Pattern
  • Web Application Contexts
  • Annotation-Based Handler Mappings
  • @Controller and @RequestMapping
  • "Creating" a Model
  • Entities, Not Views

Handling Requests

  • Matching URLs
  • Matching Methods
  • Matching Content Types
  • Path Variables
  • Request Parameters
  • Headers and Cookies
  • Injectable Method Parameters
  • Command Objects vs. Entities
  • @RequestBody and @ResponseBody
  • @RestController
  • HttpEntity<T> and ResponseEntity<T>

Producing Responses

  • Return Types
  • Default Content Types
  • Default Status Codes
  • @ResponseStatus and HttpStatus
  • The produces Element
  • ResponseEntity<T>
  • Binary Content

Entities and Complex Content

  • Converters and Formatters
  • HttpMessageConverter
  • Using <mvc:annotation-driven />
  • Built-In HttpMessageConverters
  • Working with XML
  • Working with JSON
  • Custom Message Converters

Generic Services

  • Applying Patterns
  • Generic Service Methods
  • Annotation Inheritance
  • Separation of Concerns
  • CRUD, Sub-Resource, and Business Methods
  • Entity Representations
  • Entity Relationships

Error Handling and Validation

  • Error Handling for REST Services
  • HandlerException Resolver
  • @ExceptionHandler
  • @ControllerAdvice for Global Handling
  • Validation in Spring MVC
  • Java-EE Bean Validation
  • Configuration
  • Support for @Valid
  • Message Sources and Localization
  • Resolving Error Codes

Data Representations and Hypermedia

  • Multiple Representations
  • Filtering with @JsonView
  • Handling Object Associations: Embedding
  • Handling Object Associations: Passing IDs
  • Handling Object Associations: Linking
  • Hypermedia

REST Clients

  • RestTemplate
  • Sending HTTP Requests
  • Translating Entities
  • Reading Responses
  • Error Handlers

Persistence with JDBC

  • Reducing Code Complexity
  • The DataAccessException Hierarchy
  • JdbcTemplate
  • RowMapper<T> and ResultSetExtractor<T>
  • The DaoSupport Hierarchy
  • Capturing Generated Keys
  • Transaction Control
  • TransactionTemplate
  • Isolation Levels
  • Transaction Propagation

Persistence with JPA

  • Object/Relational Mapping
  • The Java Persistence API
  • JpaDaoSupport and JpaTemplate
  • @PersistenceUnit and @PersistenceContext
  • Shared Entity Managers
  • Using <tx:annotation-driven>
  • The @Transaction Annotation
  • Isolation and Propagation
  • A Limitation of @Transactional
  • Understanding Entity States
  • Bean Validation in JPA
  • Optimistic Locking
  • Bi-Directional Associations and Serialization
  • Using @XmlTransient
  • Using @JsonView


  • Testability of Spring Applications
  • Dependency Injection
  • Mocking
  • SpringJUnit4ClassRunner
  • TestContext
  • @ContextConfiguration
  • Mocking Spring MVC
  • Building Requests
  • Checking Content
  • xpath() and jsonPath()
  • Profiles
  • Testing Persistence Components

Free Resources from Intertech

Free Tutorial: Spring Batch Admin

Free Whitepaper: Spring 4 Meta Annotations

Free Whitepaper: Spring MVC Model & Session Attributes