Home » Enterprise Java

Enterprise Java

Hibernate Load Example

Hibernate Session provide different methods to fetch the data (or a single record) from the database. Two of them are – get() and load(). The functionality is similar but there is a difference between the ways they work. In this tutorial, we will demonstrate the use of load() method in Hibernate using the annotation based configuration. 1. Introduction 1.1 Hibernate ...

Read More »

Spring Caching Tutorial

Caching is crucial for today’s high-performance hungry applications. Adding Caching in a spring based application is rather trivial. In this tutorial, we will show you how to enable the data caching in a spring application by integrating the application with the popular EhCache framework. Table Of Contents 1. Introduction 1.1 Spring Framework 1.2 Spring Cache 1.3 EhCache 2. Spring Cache ...

Read More »

Spring Setter Injection Example

One of the most important development principles of the modern software design is the Dependency Injection (DI) which quite naturally flows out of another critically important principle called Modularity. This tutorial will explore a specific type of DI technique within the spring framework called Setter-Based Dependency Injection which simply injects the dependent objects into the client using a setter method. ...

Read More »

Spring Batch Step by Step Example

Spring Batch is a lightweight, comprehensive batch framework designed to enable the development of the robust batch applications vital for the daily operations of the enterprise systems. In this post, we will create a simple Spring batch tutorial to read the data from the CSV to an XML file. Table Of Contents 1. Introduction 1.1 Spring Framework 1.2 Spring Batch ...

Read More »

Spring Constructor Injection Example

One of the most important development principles of the modern software design is the Dependency Injection (DI) which quite naturally flows out of another critically important principle called Modularity. This tutorial will explore a specific type of DI technique within the spring framework called Constructor-Based Dependency Injection which simply puts the required components into a class at the time of ...

Read More »

Sending Email With Spring MVC Example

Spring provides the first-class support for sending emails. It comes with the utility libraries which abstracts away the complexities of the underlying mailing system and provides a simple API to use in the application for sending emails. In this tutorial, we will show how to write a simple Web application for sending an email based on the Spring MVC framework ...

Read More »

Spring NamespaceHandler Example

This article will discuss one of the most common configuration problems in the spring framework i.e. ‘A namespace handler for one of the spring namespaces is not found’. Most of the times, this means that one particular spring jar is missing from the classpath. So, let’s go over what these missing schemas might be, and what the missing dependency is ...

Read More »

Spring JdbcTemplate CRUD Operations Tutorial

Spring JdbcTemplate is a powerful mechanism to connect to the database and execute SQL queries. In this tutorial, we will discuss the Spring JdbcTemplate and we will cover all the CRUD operations. Table Of Contents 1. Introduction 1.1 Spring Framework 1.2 Why to use Spring Jdbc Template? 1.3 Spring Jdbc 1.4 CRUD Operations 1.5 Download and Install MySQL 2. Spring ...

Read More »

Using MockRestServiceServer to Test a REST Client

This article is an example in using MockRestServiceServer to test a REST client. MockRestServiceServer is a part of the Spring library for testing. It is the main entry point for client-side REST testing. It provides mock responses from expected requests through the RestTemplate. It eliminates the use of an actual server and thus speeds up the testing process. With its ...

Read More »

Spring Framework GraphQL Tutorial

GraphQL is a relatively new concept from Facebook that is billed as an alternative to REST for Web APIs. This article will give an introduction to setting up a GraphQL server using Spring Boot so that it can be added to the existing applications or it can be used in new ones. Table Of Contents 1. Introduction 1.1 Spring Framework ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns