Home » spring » Page 18

Tag Archives: spring

JAX-WS Spring Integration Example

This is an example that demonstrates how you to use JAX-WS to create a simple Web Service and use Spring Framework to perform Dependency Injection with a bean. There are three ways of exposing Spring POJO services as a JAX–WS web services : Exposing Servlet – based web services (suitable for Java EE 5 environments) Exporting standalone web services (suitable when utilizing Sun’s JDK 1.6 build–inJAX–WS provider) Exporting ...

Read More »

Delete records in database with JdbcTemplate

With this example we are going to demonstrate how to delete records in a database, using the JdbcTemplate class provided by the Spring Framework. The JdbcTemplate class is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and ...

Read More »

Create Data Source for JdbcTemplate

This is an example of how to create a Datasource for the JdbcTemplate class provided by the Spring Framework. The DataSource class is a utility class that provides connection to the database. It is part of the JDBC specification and allows a container or a framework to hide connection pooling and transaction management issues from the application code. Creating a ...

Read More »

Update records in database with JdbcTemplate

In this example we shall show you how to update records in a database using the JdbcTemplate Class provided by the Spring Framework. The JdbcTemplate class is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and extract ...

Read More »

Select records from database with JdbcTemplate

With this example we are going to demonstrate how to select records from a database using the JdbcTemplate class provided by the Spring Framework. The JdbcTemplate class is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and ...

Read More »

Insert record in database with JdbcTemplate

This is an example of how to insert a record to the database using the JdbcTemplate class provided by the Spring Framework. The JdbcTemplate class is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and extract results. ...

Read More »

Spring MVC interceptor example

The demonstration code shows you how to modify the incoming HttpServletRequest object before it reaches your controller. This does nothing more than add a simple string to the request. public class RequestInitializeInterceptor extends HandlerInterceptorAdapter { // Obtain a suitable logger. private static Log logger = LogFactory .getLog(RequestInitializeInterceptor.class); /** * In this case intercept the request BEFORE it reaches the controller ...

Read More »