Selecting elements that are direct children of another element

In this post of JQuery, I will show how to select elements that are direct childrens of another element. Below is the complete html code that will be used as an example 1 <html> 2 <head> 3 https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js 4 </head> 5 <body> 6 7 function selectElementByHierarchy1() { 8 var $element = $(‘#Items1 > li’); 9…… Continue reading Selecting elements that are direct children of another element

Adding Step Level Listeners using StepExecutionListener

In this post of Spring Batch, I will explain how to add step level listeners. Spring Batch provides a facility to add listeners at step level. The listeners are executed before the step is started and after the step is finished. This post explains how to create step level listeners and integrate them with the…… Continue reading Adding Step Level Listeners using StepExecutionListener

Quartz JobDataMap Example Part 1

In this post of Quartz scheduler, I will explain what is JobDataMap and how to use it. JobDataMap is an implementation of java Map interface. In addition to the methods of Map interface additional methods are added for storing and retrieving primitive types. JobDataMap holds data as a key value pair. It is used to…… Continue reading Quartz JobDataMap Example Part 1

Reading from multiple files using MultiResourceItemReader

In this post of Spring Batch, I will explain how to read from multiple files. We take the help of org.springframework.batch.item.file.MultiResourceItemReader, it reads from multiple file. The MultiResourceItemReader takes two arguments1) list of resources or pattern followed by the multiple source files, from which the data has to be read2) Reference to reader bean which…… Continue reading Reading from multiple files using MultiResourceItemReader

UnMarshalling YAML file to Java Object

This post explains unmarshalling information stored in YAML format to java object . This can be achieved with the help of YAMLMapper provided by jackson package. To explain with an example we will use the below pojo objects Employee package package2; import java.math.BigDecimal; import java.util.List; public class Employee { private String id; private String name;…… Continue reading UnMarshalling YAML file to Java Object

Marshalling Java Object to YAML format

This post explains marshalling a java object to YAML format and storing it to a file. This can be achieved with the help of YAMLMapper provided by jackson package. To explain with an example we will use the below pojo objects. Employee package package2; import java.math.BigDecimal; import java.util.List; public class Employee { private String id;…… Continue reading Marshalling Java Object to YAML format

Creating a YAML file

The below post explains how to write YAML data to file using YAMLGenerator. YAMLGenerator writes the data to a file in streaming way, helping the developer using the api to avoid creating an object representation of the entire data. We can get an instance of YAMLGenerator with the help of an instance of YAMLFactory as…… Continue reading Creating a YAML file