Spring XML Config

Conditional Statement in Spring Config

Sometimes we may need to have some conditional statement in Spring config XML file depending upon some variables value. Think of a situation when you are using JPA in your application and your application may have two persistence units in Spring XML config file and you need to connect to one of them depending upon […]

Spring @PostConstruct and @PreDestroy Example

This tutorial will show you how we can use @PostConstruct and @PreDestroy in Spring. @PostConstruct and @PreDestroy annotations are generally considered best practice for receiving lifecycle callbacks in a modern Spring application. Using these annotations means that our beans are not coupled to Spring specific interfaces. For more information please refer to http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/beans.html#beans-postconstruct-and-predestroy-annotations Sometimes we […]

How to concurrently execute tasks using Java in Spring

This tutorials will show you how we can concurrently execute different operations using Java utility class called java.util.concurrent.Executors in Spring framework. Spring supports XML as well as Programmatic configuration of beans but, here we will use XML based metadata configuration. If you already have an idea on how to create a maven project in Eclipse […]

Call Stored Procedure using Spring StoredProcedure

This tutorial will show you how we can stored procedure using Spring SimpleJdbcCall. For this tutorial we will create a standalone maven project in Eclipse. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I will tell you here how to create a maven project […]

Call Stored Procedure using Spring SimpleJdbcCall

This tutorial will show you how we can stored procedure using Spring SimpleJdbcCall. For this tutorial we will create a standalone maven project in Eclipse. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I will tell you here how to create a maven project […]

Batch Insert using Spring JdbcTemplate

This tutorial will show you how we can insert a large dataset into a database at once using Spring JdbcTemplate. For this tutorial we will create a standalone maven project in Eclipse. If you already have an idea on how to create a maven project in Eclipse will be great otherwise I will tell you […]

Spring 3, REST using Jersey 2.6 and Grizzly integration example

In this tutorial I will show you how to integrate REST using Jersey 2.6, Spring 3 and Grizzly web server. So I will use here Grizzly web server so we don’t need to use any other external webserver. I had been googling for many times but I did not get any satisfactory example on REST […]

Spring AOP (Aspect Oriented Programming) Example

With this tutorial we will see how to use Aspect Oriented Programming in Spring Framework. AOP is used in the Spring Framework to provide declarative enterprise services. It is also used to allow users to implement custom aspects, complementing their use of OOP with AOP. We will demonstrate how to create and apply some central […]

Integrate Spring 3, Struts 2 and Hibernate 3

Introduction This tutorial shows how to integrate Spring 3, Struts 2 and Hibernate 3 in the following example. In this example, Struts 2 will be used as a web framework and Spring 3 will be used as a core service. We will use ORM (Object Relational Mapping) framework Hibernate for our persistent layer to interact […]

Scroll to top