Home » Java » Page 31

Java

Spring Web MVC

spring-interview-questions-answers

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 »

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 »

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

java-interview-questions-answers

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 »