InvalidAlgorithmParameterException: Wrong IV Length
1. Overview The Advanced Encryption Standard (AES) is a widely used symmetric block cipher algorithm. Initialization Vector (IV) plays an important role in the AES algorithm. In this tutorial, we'll...
View ArticleWriting byte[] to a File in Java
1. Overview In this quick tutorial, we're going to learn several different ways to write a Java byte array to a file. We'll start at the beginning, using the Java IO package. Next, we'll look at an...
View ArticleConfiguring a Project to Exclude Certain Sonar Violations
1. Overview During our builds, we can use various tools to report on the quality of our source code. One such tool is SonarQube, which performs static code analysis. Sometimes we may disagree with the...
View ArticleDifference Between COPY and ADD in a Dockerfile
1. Introduction When creating Dockerfiles, it's often necessary to transfer files from the host system into the Docker image. These could be property files, native libraries, or other static content...
View ArticleViewing Contents of a JAR File
1. Overview We've learned about getting class names from a JAR file. Further, in that tutorial, we've discussed how to get the classes' names in a JAR file in a Java application. In this tutorial,...
View ArticleScheduled WebSocket Push with Spring Boot
1. Overview In this tutorial, we'll see how to send scheduled messages from a server to the browser using WebSockets. An alternative would be using Server sent events (SSE), but we won't be covering...
View ArticleJava Weekly, Issue 364
1. Spring and Java >> HotSpot Intrinsics [alidg.me] What you see isn't what you get: an introduction to how compiler intrinsics works on the HotSpot JVM! >> Smaller, Faster-starting...
View ArticleGet list of JSON objects with Spring RestTemplate
1. Overview Our services often have to communicate with other REST services in order to fetch information. In Spring, we can use RestTemplate to perform synchronous HTTP requests. The data is usually...
View ArticleUnmarshalling a JSON Array Using camel-jackson
1. Overview Apache Camel is a powerful open-source integration framework implementing a number of the known Enterprise Integration Patterns. Typically when working with message routing using Camel,...
View ArticleRedis vs MongoDB
1. Overview Often, we find it challenging to decide on a non-relational database as a primary data store for our applications. In this article, we'll explore two popular non-relational databases, Redis...
View ArticleJava 14 – New Features
1. Overview Java 14 released on March 17, 2020, exactly six months after its previous version as per Java's new release cadence. In this tutorial, we'll look at a summary of new and deprecated features...
View ArticleBehavioral Patterns in Core Java
1. Introduction Recently we looked at Creational Design Patterns and where to find them within the JVM and other core libraries. Now we're going to look at Behavioral Design Patterns. These focus on...
View ArticleSpring Boot: Customize the Jackson ObjectMapper
1. Overview When using JSON format, Spring Boot will use an ObjectMapper instance to serialize responses and deserialize requests. In this tutorial, we'll take a look at the most common ways to...
View ArticleCollections.synchronizedMap vs. ConcurrentHashMap
1. Overview In this tutorial, we'll discuss the differences between Collections.synchronizedMap() and ConcurrentHashMap. Additionally, we'll look at the performance outputs of the read and write...
View ArticleJava Weekly, Issue 365
1. Spring and Java >> Troubleshooting Native Memory Leaks in Java Applications [blogs.oracle.com] Native out of memory error – different approaches to identify the native memory leaks and...
View ArticleIntegration Tests With Spring Cloud Netflix and Feign
1. Overview In this article, we're going to explore the integration testing of a Feign Client. We'll create a basic Open Feign Client for which we'll write a simple integration test with the help of...
View ArticleCharacter#isAlphabetic vs. Character#isLetter
1. Overview In this tutorial, we'll start by briefly going through some general category types for every defined Unicode code point or character range to understand the difference between letters and...
View ArticleJava Weekly, Issue 366
1. Spring and Java >> Do Loom’s Claims Stack Up? Part 1: Millions of Threads? [webtide.com] Gym membership and millions of loom virtual threads – evaluating the effect of GC and deep stacks on...
View ArticleDifference Between spring-boot:repackage and Maven package
1. Overview Apache Maven is a widely used project dependency management tool and project building tool. Over the last few years, Spring Boot has become a quite popular framework to build applications....
View ArticleNew Features in Java 11
1. Overview Oracle released Java 11 in September 2018, only 6 months after its predecessor, version 10. Java 11 is the first long-term support (LTS) release after Java 8. Oracle also stopped supporting...
View Article