How to write Text File in Java by BufferedWriter

Java provides a BufferedWriter for writting content to File with high performance when performing with large number of write action. Because BufferedWriter decreases I/O interaction by using internal buffer to write data into File.
Related posts:
1. Java Read Text File by BufferedReader, Java 7,Java 8
2. How to delete non-empty Folder in Java

[Continue reading…] “How to write Text File in Java by BufferedWriter”

Java recursion – Towers Of Hanoi

Earlier in the tutorial Solution for find the N-th Fibonacci number, we have already known the methods that can be easily implemented with recursion and iteration. Today we will see a solution which demonstrates the power of recursion, and the iterative solution may not be a clearer method: Towers of Hanoi.

[Continue reading…] “Java recursion – Towers Of Hanoi”

How to use Spring Security JDBC Authentication with PostgreSQL & Spring Boot

In this tutorial, JavaSampleApproach uses PostgreSQL & Spring Boot to develop a Spring Security JDBC for Authentication.

Related Articles:
How to use Spring Security JDBC Authentication with MySQL & Spring Boot
Spring Security – Config Security for Web MVC by Spring Boot
Spring Security – Customize Login Handler
Spring Security Customize Logout Handler
Spring Security – Customize Authentication Provider

[Continue reading…] “How to use Spring Security JDBC Authentication with PostgreSQL & Spring Boot”

How to execute asynchronous query with Spring JPA and PostgreSQL | Spring Boot

In tradition approach, implementing Data Access Layer makes lots of boilerplate code. Spring Data provides us Spring JPA which supports the ways to write interface for repositories and custom finder methods. The implementation will be done automatically by Spring Framework.

The tutorial shows you how to execute asynchronous query with Spring JPA and PostgreSQL using Spring Boot.

Related articles:
Java 8 Streams
How to use Spring JPA MySQL | Spring Boot
How to use Spring JPA with PostgreSQL | Spring Boot
How to get streaming results with Spring JPA, Java 8 Stream and PostgreSQL | Spring Boot
@DataJPATest with Spring Boot

[Continue reading…] “How to execute asynchronous query with Spring JPA and PostgreSQL | Spring Boot”

Java Regular Expression to mask information from a Text

This tutorial shows you how to mask information from a Text using Regular expression.

Related articles:
Java Regular Expression Overview – Syntax
Java Regular Expression to extract data from a Text

[Continue reading…] “Java Regular Expression to mask information from a Text”

How to get streaming results with Spring JPA, Java 8 Stream and PostgreSQL | Spring Boot

In tradition approach, implementing Data Access Layer makes lots of boilerplate code. Spring Data provides us Spring JPA which supports the ways to write interface for repositories and custom finder methods. The implementation will be done automatically by Spring Framework.

The tutorial shows you how to make streaming results with Spring JPA, Java 8 Stream and PostgreSQL using Spring Boot.

Related articles:
Java 8 Streams
How to use Spring JPA MySQL | Spring Boot
How to use Spring JPA with PostgreSQL | Spring Boot
@DataJPATest with Spring Boot

[Continue reading…] “How to get streaming results with Spring JPA, Java 8 Stream and PostgreSQL | Spring Boot”

How to configure Spring Batch Step for restart

In How to use Spring Batch Restartable Function, we had discussed about how to restart a Job. Today, JavaSampleApproach will guide you how to use additional configuration for step in case restart a Batch Job.

Related articles:
1. How to use Spring Batch Restartable Function
2. Spring Batch XML Config by Spring Boot

[Continue reading…] “How to configure Spring Batch Step for restart”

Java Regular Expression to extract data from a Text

This tutorial shows you how to extract data from a Text using Regular expression.

Related article: Java Regular Expression Overview – Syntax

[Continue reading…] “Java Regular Expression to extract data from a Text”

Java Regular Expression Overview – Syntax

Regular expression (regex) defines patterns to recognise strings. Those patterns can be anything: a character, a specific string, a group of special characters or a combination of them. We can use Regular expression for searching, extracting, and modifying text.
This tutorial shows you an overview of Regular Expression Syntax.

[Continue reading…] “Java Regular Expression Overview – Syntax”

How to delete non-empty Folder in Java

Java supports a function: java.io.File.delete() to delete a File or an empty directory. But with non-empty folders, we need to implement function to delete them. In the tutorial, JavaSampleApproach will show you how to develop a recursive funtion to delete non-empty Folder.

[Continue reading…] “How to delete non-empty Folder in Java”

How to use Spring Batch Tasklet

Spring Batch provides the Tasklet interface, to process a single task, such as clean or init resources before or after any step running. In the tutorial, JavaSampleApproach will guide you how to use Spring Batch Tasklet.

Related Posts:
How to start with Spring Batch using Spring Boot – Java Config
Spring Batch XML Config by Spring Boot
Spring Batch Job with Parallel Steps
Spring Batch – Programmatic Flow Decision
How to import CSV data to PostgreSQL Database using Spring Batch Job
Spring XD Option Module – Batch Job with PostgreSQL Datasource
How to use Spring Batch Restartable Function

[Continue reading…] “How to use Spring Batch Tasklet”

@DataJPATest with Spring Boot

Unit Test is so important in Software Development. Spring Boot provides @DataJpaTest annotation to make the writing test for JPA applications more simpler.

This tutorial shows you how to apply @DataJpaTest with TestEntityManager.

Related article:
How to use Spring JPA MySQL | Spring Boot
UnitTest – Maven skip test with SpringBoot
Spring Boot Unit Test for Spring MVC Controller

[Continue reading…] “@DataJPATest with Spring Boot”

How to use Spring Integration Http Inbound with Spring Boot

In the tutorial, JavaSampleApproach will guide you how to use Spring Http Inbound with Spring Boot.
Related Post:
How to start Spring Integration with Spring Boot

[Continue reading…] “How to use Spring Integration Http Inbound with Spring Boot”

How to start Spring Integration with Spring Boot

In the tutorial, JavaSampleApproach will show you how to build a simple Spring Integration with Spring Boot.

Related post:
How to use Spring Integration Http Inbound with Spring Boot

[Continue reading…] “How to start Spring Integration with Spring Boot”