REST API Discoverability and HATEOAS 1. Overview This article will focus on Discoverability of the REST API, HATEOAS and practical scenarios driven by tests. 2. Why Make the API Discoverable Discoverability of an API is a topic that doesn’t get enough well-deserved attention. As a consequence, very few APIs get… Continue Reading restful-web-service-discoverability

Spring JSON-P with Jackson 1. Overview If you’ve been developing anything on the web, you’re aware of the same-origin policy constraint browsers have when dealing with AJAX requests. The simple overview of the constraint is that any request originating from a different domain, schema or port, will not be permitted.… Continue Reading spring-jackson-jsonp

How to Compress Requests Using the Spring RestTemplate 1. Introduction In this short tutorial, we’ll look at how to send HTTP requests containing compressed data. In addition, we’ll look at how to configure a Spring web application so it handles compressed requests. 2. Sending Compressed Requests Firstly, let’s create a… Continue Reading spring-resttemplate-compressing-requests

Custom Scope in Spring 1. Overview Out of the box, Spring provides two standard bean scopes (“singleton” and “prototype”) that can be used in any Spring application, plus three additional bean scopes (“request”, “session”, and “globalSession”) for use only in web-aware applications. The standard bean scopes cannot be overridden, and… Continue Reading spring-custom-scope

Guide to Spring Type Conversions 1. Introduction In this article, we’ll have a look at Spring’s type conversions. Spring provides out-of-the-box various converters for built-in types; this means converting to/from basic types like String, Integer, Boolean and a number of other types. Apart from this, Spring also provides a solid… Continue Reading spring-type-conversions