Home Page2019-02-28T07:29:19+00:00

Configuring a Custom ObjectMapper for Spring RestTemplate

Configuring a Custom ObjectMapper for Spring RestTemplate One of the great things about RestTemplate is its simplicity. You simply instantiate it like this... RestTemplate restTemplate = new RestTemplate(); and off you go. Under the hood Spring automatically creates and registers a number of message converters to handle various data [...]

By |December 3rd, 2019|Categories: RestTemplate|Tags: , , , |

Jackson JSON Deserialization – UnrecognizedPropertyException

Whats the Problem? I ran into a UnrecognizedPropertyException today trying to deserialize the following JSON. { "Places": [{ "PlaceId": "LOND-sky", "PlaceName": "London", "CountryId": "UK-sky", "RegionId": "", "CityId": "LOND-sky", "CountryName": "United Kingdom" }, { "PlaceId": "LHR-sky", "PlaceName": "London Heathrow", "CountryId": "UK-sky", "RegionId": "", "CityId": "LOND-sky", "CountryName": "United Kingdom" }] } [...]

By |November 26th, 2019|Categories: Jackson, JSON|

Build, Package and Run Spring Boot Apps with Docker

I've recently started playing around with Docker again and have decided to put together a few posts to share what I've learned. In this post  I'll show you how to compile, package and run a simple Spring Boot app in a Docker container. To keep the Docker image as [...]

By |October 1st, 2019|Categories: Containerisation, Docker|

Tips for Well Commented Code

I've always been a fan of commenting code. To me, it's a no brainer, the sensible thing to do, and a fundamental part of building software that's easy to understand and maintain. Not everyone agrees though. Some argue that comments are unessesary and simply shine a light on code [...]

By |August 30th, 2019|Categories: Software Engineering Fundamentals|

SOAP Web Services with Apache CXF and Spring Boot

This post is based on one I wrote a few years ago about building contract first web services with Apache CXF and Spring. The previous post didnt use Spring Boot and most of the Spring and CXF configuration was via XML. This post moves things forward a bit by [...]

By |June 19th, 2019|Categories: Spring, Spring Boot, Web Services|Tags: , , , , |

Introduction to Lombok

Java is often criticised for being unnecessarily verbose compared with other languages. Lombok provides a bunch of annotations that generate boilerplate code in the background, removing it from your classes and therefore helping to keep your code clean. Less boilerplate means more concise code that's easier to read and [...]

By |April 30th, 2019|Categories: Java|Tags: , |