How to Disable Spring Security Logout Redirects
1. Overview In this short tutorial, we're going to take a close look at how to disable logout redirects in Spring Security. We'll first start with a brief background on how the logout flow works in...
View ArticleOptional Dependency in Maven
1. Overview This brief tutorial will describe Maven's <optional> tag and how we can use it to reduce the size and scope of a Maven project's artifact, such as a WAR, EAR, or JAR. For a refresher...
View ArticleProbability in Java
1. Overview In this tutorial, we'll look at a few examples of how we can implement probability with Java. 2. Simulating Basic Probability To simulate probability in Java, the first thing we need to do...
View ArticleFinding the Differences Between Two Lists in Java
1. Overview Finding differences between collections of objects of the same data type is a common programming task. As an example, imagine we have a list of students who applied for an exam and another...
View ArticleOAuth 2.0 Resource Server With Spring Security 5
1. Overview In this tutorial, we'll learn how to set up an OAuth 2.0 resource server using Spring Security 5. We'll do this using JWT as well as opaque tokens, the two kinds of bearer tokens supported...
View ArticleJava Weekly, Issue 346
1. Spring and Java >> Sub-10 ms Latency in Java: Concurrent GC with Green Threads [jet-start.sh] Processing 40 million events per second while keeping the 99.99% of latencies under 12ms:...
View ArticleJPA Entity Equality
1. Overview In this tutorial, we'll take a look at handling equality with JPA Entity objects. 2. Considerations In general, equality simply means that two objects are the same. However, in Java, we can...
View ArticleExtracting Database Metadata Using JDBC
1. Overview JDBC provides a Java API to read the actual data stored in database tables. Besides this, the same API can also be used to read metadata about the database. Metadata means data about the...
View ArticleCustomizing Themes for Keycloak
1. Overview Keycloak is an open-source identity and access management or IAM solution, that can be used as a third-party authorization server to manage our web or mobile applications' authentication...
View ArticleFind the Kth Smallest Element in Two Sorted Arrays
1. Introduction In this article, we'll see how to find the kth-smallest element in the union of two sorted arrays. First, we'll define the exact problem. Second, we'll see two inefficient but...
View ArticleA Guide to Concurrent Queues in Java
1. Overview In this tutorial, we'll walk through some of the main implementations of concurrent queues in Java. For a general introduction to queues, refer to our Guide to the Java Queue Interface...
View ArticleList All Classes Loaded in a Specific Class Loader
1. Overview In this tutorial, we'll analyze the technique to list all the classes loaded by a specific class loader in Java, using the Java Instrumentation API. We'll also see how to create and load a...
View ArticleWhat Is the Difference Between DVM and JVM?
1. Introduction In this article, we'll explore the differences between the Java Virtual Machine (JVM) and the Dalvik Virtual Machine (DVM). We'll first take a quick look at each of them and then make a...
View ArticleIntroduction to Spring Data Azure Cosmos DB
1. Overview In this tutorial, we'll learn about Azure Cosmos DB and how we can interact with it using Spring Data. 2. Azure Cosmos DB Azure Cosmos DB is Microsoft's globally distributed database...
View ArticleWhat Is the Hi/Lo Algorithm?
1. Introduction In this tutorial, we'll explain the Hi/Lo Algorithm. It is used mostly as a database identifier generation strategy. We'll start with the algorithm overview. Then, we'll show a...
View ArticleConcurrency in Spring WebFlux
1. Introduction In this tutorial, we'll explore concurrency in reactive programs written with Spring WebFlux. We'll begin by discussing concurrency in relation to reactive programming. After that,...
View ArticleHow to Define a Map in YAML for a POJO?
1. Overview In this tutorial, we'll walk through how we can use properties defined in a YAML file to configure values for a Map in our POJO classes. 2. POJO and YAML POJO classes are Plain Old Java...
View ArticleNoSuchMethodError in Java
1. Overview In this tutorial, we'll look at the java.lang.NoSuchMethodError and some ways to handle it. 2. NoSuchMethodError As the name suggests, the NoSuchMethodError occurs when a particular method...
View ArticleJava Weekly, Issue 347
1. Spring and Java >> Creating Efficient Docker Images with Spring Boot 2.3 [spring.io] No more Dockerfiles: Leveraging layered JARs and Buildpacks to create efficient Docker images for Spring...
View ArticleLeadership Election With Consul
1. Overview In this tutorial, we'll see how Leadership Election with Consul helps to ensure data stability. We'll provide a practical example of how to manage distributed locking in concurrent...
View Article