Introduction to Spring Cloud Stream 1. Overview Spring Cloud Stream is a framework built on top of Spring Boot and Spring Integration that helps in creating event-driven or message-driven microservices. In this article, we’ll introduce concepts and constructs of Spring Cloud Stream with some simple examples. 2. Maven Dependencies To… Continue Reading spring-cloud-stream

Introduction to Vaadin 1. Overview Vaadin is a server-side Java framework for creating web user interfaces. Using it, we can create our front-end using Java features. 2. Maven Dependencies and Setup Let’s start by adding the following dependencies to our pom.xml: <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-server</artifactId> </dependency> <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiled</artifactId> </dependency> <dependency>… Continue Reading vaadin

Mock Static Method using JMockit 1. Overview Some popular mocking libraries such as Mockito and Easymock generate mock-ups by taking advantage of Java’s inheritance-based class model. EasyMock implements an interface at runtime, whereas Mockito inherits from the target class to create a mocking stub. Neither approach works well for static… Continue Reading jmockit-static-method

Exclude Fields from Serialization in Gson 1. Overview In this short tutorial, we’re going to explore the available options for excluding one or more fields of a Java class and its subclasses from Gson serialization. 2. Initial Setup Let’s first define our classes: @Data @AllArgsConstructor public class MyClass { private… Continue Reading gson-exclude-fields-serialization