Spring MVC Streaming and SSE Request Processing 1. Introduction This simple tutorial demonstrates the use of several asynchronous and streaming objects in Spring MVC 5.x.x. Specifically, we’ll review three key classes: ResponseBodyEmitter SseEmitter StreamingResponseBody Also, we’ll discuss how to interact with them using a JavaScript client. 2. ResponseBodyEmitter ResponseBodyEmitter handles async responses. Also, it represents… Continue Reading spring-mvc-sse-streams

What’s New in Spring 4.3? 1. Overview The Spring 4.3 release brought some nice refinements into core container, caching, JMS, Web MVC and testing submodules of the framework. In this post, we will discuss few of these improvements including: Implicit Constructor Injection Java 8 Default Interface Methods Support Improved Resolution… Continue Reading whats-new-in-spring-4-3

Generalized Target-Type Inference in Java 1. Introduction Type Inference was introduced in Java 5 to complement the introduction of generics and was substantially expanded in following Java releases, which is also referred to as Generalized Target-Type Inference. In this tutorial, we’ll explore this concept with code samples. 2. Generics Generics… Continue Reading java-generalized-target-type-inference

Using @Autowired in Abstract Classes 1. Introduction In this quick tutorial, we’ll explain how to use the @Autowired annotation in abstract classes. We’ll apply @Autowired to an abstract class, and focus on the important points which we should take into account. 2. Setter Injection We can use @Autowired on a setter… Continue Reading spring-autowired-abstract-class

Java TreeMap vs HashMap 1. Introduction In this article, we’re going to compare two Map implementations: TreeMap and HashMap. Both implementations form an integral part of the Java Collections Framework and store data as key-value pairs. 2. Differences ==== 2.1. Implementation We’ll first talk about the HashMap which is a… Continue Reading java-treemap-vs-hashmap