Spring MVC Content Negotiation 1. Overview This article describes how to implement content negotiation in a Spring MVC project. Generally, there are three options to determine the media type of a request: Using URL suffixes (extensions) in the request (eg .xml/.json) Using URL parameter in the request (eg ?format=json) Using… Continue Reading spring-mvc-content-negotiation-json-xml

Introduction to jOOL 1. Overview In this article, we will be looking at the jOOL __ library – another product from jOOQ. 2. Maven Dependency Let’s start by adding a Maven dependency to your pom.xml: <dependency> <groupId>org.jooq</groupId> <artifactId>jool</artifactId> <version>0.9.12</version> </dependency> You can find the latest version here. 3. Functional Interfaces… Continue Reading jool

Converting Java String to Double 1. Overview In this tutorial, we’ll cover many ways of converting a String into a double in Java. 2. Double.parseDouble We can convert a String to a double using the Double.parseDouble method: assertEquals(1.23, Double.parseDouble(“1.23”), 0.000001); 3. Double.valueOf Similarly, we can convert a String into a boxed Double using… Continue Reading java-string-to-double

Server-Sent Events in Spring 1. Overview In this tutorial, we’ll see how we can implement Server-Sent-Events-based APIs with Spring. Simply put, Server-Sent-Events, or SSE for short, is an HTTP standard that allows a web application to handle a unidirectional event stream and receive updates whenever server emits data. Spring 4.2… Continue Reading spring-server-sent-events