January 28, 2019

Spring MVC - How to handle errors from a controller?

In a web application, it is very important to handle errors. Proper error handling would protect the application from several vulnerabiliti...Read More
by Phee Jay

September 02, 2017

Spring - Initializing a Spring Bean

In Spring, it's often necessary to run custom code during a bean's initialization—for example, to validate mandatory properties or ...Read More
by Phee Jay

July 12, 2017

Spring - Lookup Method or Method Injection

Most common injection mechanisms used in Spring are Constructor and Property injections. In both the mechanisms, the injection happens only...Read More
by Phee Jay

April 28, 2017

How to Create Custom Namespaces and Handlers in Spring

Custom namespaces in spring are a way to replace the complex bean definitions with a more user-friendly configuration. Spring itself pro...Read More
by Phee Jay

April 13, 2017

Localization with Spring

Localization enables applications to cater to users of different locations and languages. Spring, as usual, has support for this aspect as ...Read More
by Phee Jay

March 29, 2017

Spring Boot - How to Create a Deployable War

Spring boot , by default, enables you to create standalone applications through simple, minimal configurations. And due to its self-contain...Read More
by Phee Jay

March 09, 2017

Spring Cache - Part 5 - CacheEvict

In the Spring Cache series so far ( Part1 , Part2 , Part3 , Part4 ), we have seen examples where the data is getting added to the cache thr...Read More
by Phee Jay

March 02, 2017

Spring Cache - Part 4 - CachePut

There are scenarios, unlike retrievals, where you do not want to skip the execution of the method e.g. insert/update of a record. Such met...Read More
by Phee Jay

March 01, 2017

Spring Cache - Part 3 - Conditional Cache

In this part of the tutorial, we will see how data can be cached conditionally. (If you haven't checked the previous parts, please vi...Read More
by Phee Jay

February 25, 2017

Spring Cache - Part 2 - Cache Keys

In part 1 of the post, we looked at how data can be cached through simple configuration. In this part, we are going to explore the cache k...Read More
by Phee Jay

February 23, 2017

Spring Cache - Part 1 - Introduction

Caching is an extremely important aspect of applications that care about lower latencies. There are a multitude of rules one has to adher...Read More
by Phee Jay

February 15, 2017

How to Timeout JDBC Queries

JDBC queries by default do not have any timeout, which means that a query can block the thread for an unlimited amount time; of co...Read More
by Phee Jay

February 09, 2017

Overriding Spring Beans with Aliases

The most common approach followed for overriding a spring bean is to define...Read More
by Phee Jay

June 26, 2015

ETags and Browser Cache

Caching resources on the browser is crucial to minimize unnecessary trips to the server and reduce the load on it. This works well for d...Read More
by Phee Jay

October 18, 2010

What Is a SessionAttributeStore? When to Use It?

In one of my projects, I had an abstract controller class that simulated the form controller of Spring 1.2 for session forms. Annotatio...Read More
by Phee Jay

October 18, 2010

Spring MVC - mvc:annotation-driven - What does it do?

The annotations based MVC was introduced to the framework in Spring 2.5. This model enables the developer to reuse any POJO as a control...Read More
by Phee Jay