Home » spring » Page 18

Tag Archives: spring

Spring MVC Handler Interceptors Example

With this tutorial we shall explain how to make use of Spring MVC handler interceptors. Handler interceptors are provided by Spring’s handler mapping mechanism, and they can be used to apply a certain functionality to requests. For example, an interceptor may be used to check for a principal. In order to create a handler interceptor, we must make use of ...

Read More »

Spring MVC Handler Mapping Example

This is an example of how to handle URL requests mapping in Spring MVC. In particular, we shall check on three handler mapping classes that Spring MVC provides for handling URL requests. They are all used to define a mapping between URL requests and handler objects. We will create a simple project with a Controller, a view (jsp) and we ...

Read More »

Spring 4 REST Hello World Example

In this example we shall show you how to create a simple application to make Rest calls, using the Spring Web MVC framework. Spring Web model-view-controller (MVC) is a Spring support framework for web-based presentation tiers. It provides a model-view-controller architecture and ready components that can be used to develop flexible and loosely coupled web applications. On a previous Spring ...

Read More »

Spring MVC Hello World Example

This is an example of the Spring MVC framework. The Spring Web model-view-controller (MVC) is a Spring support framework for web-based presentation tiers. Before creating a simple Hello World example in Spring MVC we shall check on the Spring MVC architecture. The Spring web model-view-controller (MVC) framework provides a model-view-controller architecture and ready components that can be used to develop ...

Read More »

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 »