Spring MVC is a web framework based on the model–view–controller pattern. It is based on the Spring principles and supports a wide range of server-side rendering technologies as JSP, Thymeleaf, Groovy, among others. Dispatcher Servlet It is a front controller that coordinates all the request handling activities. Delegates to the web infrastructure beans and invokes the user’s web components. It ...
Read More »Day Period Support in JDK 16
JDK 16 Early Access Build 25 (2020/11/18) includes changes for JDK-8247781 (“Day periods support”). As stated in the JDK 16 Early Access Build 25 Release Notes (“Day period support added to java.time formats”), the new functionality “translates day periods defined in Unicode Consortium‘s CLDR.” In most English-language situations using a “12-hour clock“, the “day periods” might be used instead of ...
Read More »Testing Expected Exceptions with JUnit 5
This post shows how to test for expected exceptions using JUnit 5. If you’re still on JUnit 4, please check out my previous post. Let’s start with the following class that we wish to test: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 public class Person { private final ...
Read More »Testing with Hoverfly and Java Part 4: Exact, Glob and Regex Matchers
Previously we used Hoverfly among its state feature. So far our examples have been close to an absolute request match, thus on this blog we will focus on utilising the matchers. Having a good range of matchers is very important because most API interactions are dynamic and you can’t always predict the example. Imagine a JWT signature. You can match ...
Read More »Kafka & Zookeeper for Development: Connecting Brokers to the Ensemble
Previously we created successfully a Zookeeper ensemble, now it’s time to add some Kafka brokers that will connect to the ensemble and we shall execute some commands. We will pick up from the same docker compose file we compiled previously. First let’s jump on the configuration that a Kafka broker needs. 01 02 03 04 05 06 07 08 09 ...
Read More »Constrast DataWeave and Java mapping operations
Main points: DataWeave 2.0 provides mapping capabilitiesJava and DataWeave can achieve the same mappingsDataWeave mapping operator is less verbose than Java DataWeave map operator The DataWeave 2.0 (Mule 4) map operator shares similarities with the map() method from Java’s Stream class. Mapping is a transformative operation The idea of mapping is to transform each element of an array and output ...
Read More »Deploying a Quarkus or any Java based microservice behind an Nginx reverse proxy with SSL using docker
It has been a while but as per a friend requested I am going to show you how to deploy a Quarkus microservice behind an Nginx reverse proxy using docker. What are we going to do… I am going to install docker and docker-compose on a centos 8 host and I am going to deploy a docker container that will ...
Read More »Code Generation in CUBA: What makes the magic
Introduction Code generation is a common thing in modern frameworks. There may be different reasons behind introducing code generation – from getting rid of boilerplate code to reflection replacement and creating complex solutions based on domain-specific languages. Like every technology, code generation has application areas and limitations. In this article, we will have a look at code generation usage in ...
Read More »Kafka & Zookeeper for Development: Zookeeper Ensemble
Previously we spun up Zookeeper and Kafka locally but also through Docker. What comes next is spinning up more than just one Kafka and Zookeeper node and create a 3 node cluster. To achieve this the easy way locally docker-compose will be used. Instead of spinning up various instances on the cloud or running various Java processes and altering configs, ...
Read More »