Paul Chapman

Paul Chapman

Alumni
Recent Blog posts by Paul Chapman

Pivotal Announces Spring Curriculum & Certification Changes

Engineering | May 10, 2017 | ...
Introduction It has been almost 10 years now since I taught my first Core Spring class. At that time almost everything was XML and configuring JPA or Spring Security, for example, could be a lot of hard work. Spring has matured a great deal in the meantime with component-scanning, Java Configuration and Spring Boot making it much more fun to use. And the number of Spring Projects has increased considerably. Pivotal Training continues to enhance our Spring curriculum and introduce new courses - including Spring Boot Developer and Spring Cloud Services. I have provided an overview of these…

Microservices with Spring

Engineering | July 14, 2015 | ...
Introduction NOTE: Revised July 2019 A simple example of setting up a microservices system using Spring, Spring Boot and Spring Cloud. Microservices allow large systems to be built up from a number of collaborating components. It does at the process level what Spring has always done at the component level: loosely coupled processes instead of loosely coupled components. For example imagine an online shop with separate microservices for user-accounts, product-catalog order-processing and shopping carts: Inevitably there are a number of moving parts that you have to setup and configure to…

Exception Handling in Spring MVC

Engineering | November 01, 2013 | ...
NOTE: Revised April 2018 Spring MVC provides several complimentary approaches to exception handling but, when teaching Spring MVC, I often find that my students are confused or not comfortable with them. Today I'm going to show you the various options available. Our goal is to not handle exceptions explicitly in Controller methods where possible. They are a cross-cutting concern better handled separately in dedicated code. There are three options: per exception, per controller or globally. A demonstration application that shows the points discussed here can be found at http://github.com…

Content Negotiation using Views

Engineering | June 03, 2013 | ...
In my previous post I introduced the concept of content negotiation and the three strategies Spring MVC uses to determine the content requested. In this post I want to extend the concept specifically to supporting multiple views for different content-types using the ContentNegotiatingViewResolver (or CNVR). Since we already know how to setup content-negotiation from the previous post, using it to select between multiple views is very straightforward. Simply define a CNVR like this: For every request, a @Controller would typically return a logical view name (or Spring MVC will determine one…

Content Negotiation using Spring MVC

Engineering | May 11, 2013 | ...
There are two ways to generate output using Spring MVC: In either case you'll need to deal with multiple representations (or views) of the same data returned by the controller. Working out which data format to return is called Content Negotiation. There are three situations where we need to know what type of data-format to send in the HTTP response: Determining what format the user has requested relies on a ContentNegotationStrategy. There are default implementations available out of the box, but you can also implement your own if you wish. In this post I want to discuss how to configure and…

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all