This category contains posts related to the Spring Framework and its implementation

Integrating Database Layer – Shop Smart

Introduction In the previous post Spring Application Setup – Shop Smart we learnt how to setup Spring and JUnit for development environment using Eclipse. Let us now add a data access layer (commonly known as DAO layer) to our application, so that we can easily communicate with the database (HSQL or MySQL or any other database supported by Hibernate). Hibernate - A brief Discussion Hibernate is a huge topic and deserves its own series of posts. Here I would just like to point out few basic stuff about this framework. It all starts with the need of persisting an object. Imagine t...
Read More

Spring Application Setup – Shop Smart

Project Setup Following the previous article, one thing is very clear that our application will deal with users. The users can then be categorized into customers, sellers, operations, administrators and other. But at the core, all of them are users and they will need credentials to access the system. Also, we talked about various modes of authentication, but let us assume that the basic mode of authentication is database or file. So, let us define the user tables as shown below: SS_USER - The User Table We will keep it simple for now with the following columns: [crayon-5b2ef0ac5b731099...
Read More

Annotation Based Spring MVC

Introduction - Annotation based spring MVC With increased support for annotations in Spring framework, it has evolved more beautifully. Spring exploits annotations to the best of its use. Eliminating the use of xml based configuration, which I was waiting for a long time. Imagine a scenario where you really do not need to load xml based configuration files to host a spring web application. Here we try to write a simple Annotation Based Spring MVC REST Web-service. This article describes briefly how to use annotation based configuration in Spring. Web Application Development from Scratch ...
Read More

Basics of Spring Integration

Introduction to Basics of Spring Integration With growing business needs and the number of components interacting to each other in a wide business setup, there arises a need for integrating the systems effectively. A traditional approach of integrating various systems is to connect each system with the remaining systems. This precisely means that if we have N systems to integrate, there would be N-1 connections from each system. Here we try to achieve this using Spring Integration. Assumptions made while writing this blog: You have a basic understanding of Spring framework and dependency...
Read More

Extracting ResultSetMetaData from Spring JdbcTemplate

This is in response to a programming problem where extracting ResultSetMetaData from Spring JdbcTemplate was the requirement. Spring provides a wrapper over ResultSet and gives us the options to map the returned RestultSet with an object of our choice. This is easily achieved by using RowMapper interface. Below is a sample code for the usage of RowMapper: [crayon-5b2ef0ac5d64e758010045/] This can be easily done using RowMapper if the returned ResultSet is not empty. The problem arrives when the ResultSet is empty. The ResultSet is closed and it can't be used to fetch the ResultSetMetaDat...
Read More