Keep Track of Logged In Users with Spring Security 1. Overview In this quick tutorial, we’re going to show an example of how we can track the currently logged in users in an application using Spring Security. For this purpose, we’re going to keep track of a list of logged… Continue Reading spring-security-track-logged-in-users

Programmatic Configuration with Log4j 2 1. Introduction In this tutorial, we’ll take a look at different ways to programmatically configure Apache Log4j 2. 2. Initial Setup To start using Log4j 2, we merely need to include the log4j-core and log4j-slf4j-impl dependencies in our pom.xml: <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.11.0</version> </dependency> <dependency>… Continue Reading log4j2-programmatic-config

Quick Intro to Spring Cloud Configuration 1. Overview Spring Cloud Config is Spring’s client/server approach for storing and serving distributed configurations across multiple applications and environments. This configuration store is ideally versioned under Git version control and can be modified at application runtime. While it fits very well in Spring… Continue Reading spring-cloud-configuration

Remove the First Element from a List 1. Overview In this super-quick tutorial, we’ll show how to remove the first element from a List. We’ll perform this operation for two common implementations of the List interface – ArrayList and LinkedList. 2. Creating a List Firstly, let’s populate our Lists: @Before public… Continue Reading java-remove-first-element-from-list