Guide to Spring Handler Mappings 1. Introduction In Spring MVC, the DispatcherServlet acts as front controller – receiving all incoming HTTP requests and processing them. Simply put, the processing occurs by passing the requests to the relevant component with the help of handler mappings. HandlerMapping is an interface that defines… Continue Reading spring-handler-mappings

Difference Between save() and saveAndFlush() in Spring Data JPA 1. Overview In this short tutorial, we’re going to discuss the difference between the save() and saveAndFlush() methods in Spring Data JPA. Even though both of these methods are used for saving entities to the database, there are some fundamental differences.… Continue Reading spring-data-jpa-save-saveandflush

Example of Hill Climbing Algorithm 1. Overview In this tutorial, we’ll show the Hill-Climbing algorithm and its implementation. We’ll also look at its benefits and shortcomings. Before directly jumping into it, let’s discuss generate-and-test algorithms approach briefly. 2. Generate-And-Test Algorithm It’s a very simple technique that allows us to algorithmize… Continue Reading java-hill-climbing-algorithm

A Controller, Service and DAO Example with Spring Boot and JSF 1. Introduction JavaServer Faces is a server-side component-based user interface framework. Originally it was developed as part of the Java EE. In this tutorial, we’ll investigate how to integrate JSF into a Spring Boot application. As an example, we’ll implement… Continue Reading jsf-spring-boot-controller-service-dao

Chain of Responsibility Design Pattern in Java 1. Introduction In this article, we’re going to take a look at a widely used behavioral design pattern: Chain of Responsibility. We can find more design patterns in our previous article. 2. Chain of Responsibility Wikipedia defines Chain of Responsibility as a design… Continue Reading chain-of-responsibility-pattern

Variable and Method Hiding in Java 1. Introduction In this tutorial, we’re going to learn about variable and method hiding in the Java language. First, we’ll understand the concept and purpose of each of these scenarios. After that, we’ll dive into the use cases and examine different examples. 2. Variable… Continue Reading java-variable-method-hiding