-
Mail

Sending e-mails with Spring
We will create a simple Spring service that will be used for sending mail. One method will create a SimpleMailMessage…
Read More » -
Beans

Declare bean in Spring container
With this example we are going to demonstrate how to declare a Bean in the Spring container. A Spring bean…
Read More » -
Beans

Use preferences in Spring
Spring provides PreferencesPlaceholderConfigurer that can be used to load preferences. <bean id="preferencePlaceHolder" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"> <property name="userTreePath" value="com.myapp.preference.staticPreferenceLoader" /> </bean> <bean id="myEntity"…
Read More » -
MVC

Spring MVC interceptor example
The demonstration code shows you how to modify the incoming HttpServletRequest object before it reaches your controller. This does nothing…
Read More » -
hibernate

Add Restrictions to the Criteria object in Hibernate
In this example we shall show you how to add restrictions to the Criteria object in Hibernate. In Hibernate, Criteria…
Read More » -
hibernate

Select list of objects in Hibernate with Restrictions
With this example we are going to demonstrate how to select a list of objects in Hibernate using Restrictions. In…
Read More » -
hibernate

Order query resultset in Hibernate with Criteria
This is an example of how to order a query resultset in Hibernate with Criteria. In Hibernate, Criteria is a…
Read More » -
hibernate

Retrieve record in Hibernate with Criteria
In this example we shall show you how to retrieve a record in Hibernate with Criteria. To retrieve a record…
Read More » -
hibernate

Count total records in Hibernate with Projections
With this example we are going to demonstrate how to count total records in Hibernate using the Projections Class. In…
Read More » -
hibernate

Pagination in Hibernate with Criteria API
This is an example of how to use pagination in Hibernate using the Criteria API. A typical way to create…
Read More »



