Learn a few ways to write unit tests for code that uses JdbcTemplate >>>
Yearly Archives: 2020
Boruvka’s Algorithm for Minimum Spanning Trees in Java
Learn about the Java implementation of Boruvka’s algorithm for finding a Minimum Spanning Tree (MST) of an edge-weighted graph. >>>
Gradient Descent in Java
Learn about Gradient Descent in Java and why backtracking is so important. >>>
Guide to AtomicMarkableReference
Dive into the details of the AtomicMarkableReference class from the java.util.concurrent.atomic package >>>
Java Weekly, Issue 326
An overview of the RSocket request-stream messaging model, and a quick guide to writing a controller for Kubernetes clusters in Java using the Fabric8 API. >>>
Java Convert PDF to Base64
Learn how to do Base64 encoding and decoding of a PDF file using Java 8 and Apache Commons Codec. >>>
Introduction to Lock Striping
Learn the key differences between coarse-grained synchronization and fine-grained synchronization and how to implement them in Java. >>>
Quick Guide to Hibernate enable_lazy_load_no_trans Property
Lazy loading can reduce unnecessary database traffic, but it requires all lazy-loaded object navigation within the session. Hibernate provides a workaround. >>>
Java IO vs NIO
Learn about the Java IO and NIO libraries and how they differ. >>>
Introduction to Alibaba Arthas
Learn how to monitor, profile, and troubleshoot our Java applications using Alibaba Arthas. >>>
Difference Between Thread and Virtual Thread in Java
A quick and practical comparison between Threads and Virtual Threads in Java. >>>
Spring REST API + OAuth2 + Angular (using the Spring Security OAuth legacy stack)
Learn how to set up OAuth2 for a Spring REST API and how to consume that from an Angular client. >>>
Keycloak Embedded in a Spring Boot Application
Learn how to set up a pre-configured embedded Keycloak server that can be booted up within a Spring Boot application. >>>
L-Trim and R-Trim Alternatives in Java
Learn several methods how to achieve l-trim and r-trim in java. >>>
IntelliJ – Cannot Resolve Spring Boot Configuration Properties Error
IntelliJ can provide autocomplete and context help for custom properties, but we need to make some additional configuration to our project to enable that. >>>
Compare Two JSON Objects with Gson
Comparison of JSON in its string representation is often less effective than comparing it semantically. Here we use Gson to load the JSON and compare the data. >>>
Java Weekly, Issue 325
A handful of tips for getting the most out of Java 14 with Spring, and a good overview of the RSocket protocol’s fire-and-forget messaging. >>>
Optical Character Recognition with Tesseract
In this tutorial, we’ll explore Tesseract, an optical character recognition (OCR) engine, with a few examples of image-to-text processing. >>>
Guide to the Java Authentication And Authorization Service (JAAS)
Learn about the JAAS security framework that augments the security model from code-based security to user-based security >>>
Delete Everything in Redis
We may need to clear a Redis cache when its data becomes out of date. We explore how to do this with both the command line and Java client. >>>