Copying elements from one list to another list

In this post under Java Collections, I will show with example how to copy elements from one list to another. Below is the complete code for your reference. Main class 1 package core.collection; 2 3 import java.util.ArrayList; 4 import java.util.Collections; 5 import java.util.List; 6 7 public class ListCopyDemo { 8 public static void main(String []…… Continue reading Copying elements from one list to another list

Retrieving a user defined Java object as part of GET request

In this post under Spring WebClient, I show with example how to receive a user defined Java object as a response of GET request. In all my previous post under Spring WebClient, I used to received data of type String class as part of GET request. Now in this example I will receive a user…… Continue reading Retrieving a user defined Java object as part of GET request

Ordering Application Event listener

In my previous post under Spring Core, I showed you guys, how to listed to application events, how to create and publish our own application event, and how to associate multiple event listeners to one particular event. In this post under Spring Core, I will show with example how to order multiple application event listener…… Continue reading Ordering Application Event listener

Checking whether password contains username or not

In this post under Passay, I will show with example the purpose and how to use “UsernameRule” class. When a user register on a website they come up with username and password. They tend to create a password that is easy to remember for example using DOB as password, nick name as password etc. Sometimes…… Continue reading Checking whether password contains username or not

Chaining multiple application event listener

In previous post under Spring Core, I showed1) how to listen for events generated from application context2) how to generate and listen for custom application event. In this post, I will show with example how to chain multiple event listener for a particular application event For our example, I will take “ContextStoppedEvent” event which is…… Continue reading Chaining multiple application event listener