Accessing Restful services. HTTP Message converters

Registered converters When accessing to Restful services, the Spring class RestTemplate maintains a list of message converters. This list will be used to marshal objects into the request body, or unmarshalling them from the response. When instantiating the RestTemplate class, it automatically fills a list…

Spring property-placeholder: External properties configuration

The PopertyPlaceholderConfigurer A common way of setting the configuration of the web application is by defining it in a properties file. We can find this file in the classpath. The way of doing this is using the PropertyPlaceholderConfigurer class, or simplifying the configuration, using the…

Create and test REST services with Spring MVC

Introduction The first part of this example shows how to create and test REST services using Spring MVC. The controller contains CRUD operations on warehouses and its products. For this example, the repository is a stub that simulates access to the database. The second part…