Home » spring » Page 14

Tag Archives: spring

Spring Constructor Injection Example

One of the most important development principles of the modern software design is the Dependency Injection (DI) which quite naturally flows out of another critically important principle called Modularity. This tutorial will explore a specific type of DI technique within the spring framework called Constructor-Based Dependency Injection which simply puts the required components into a class at the time of ...

Read More »

Sending Email With Spring MVC Example

Spring provides the first-class support for sending emails. It comes with the utility libraries which abstracts away the complexities of the underlying mailing system and provides a simple API to use in the application for sending emails. In this tutorial, we will show how to write a simple Web application for sending an email based on the Spring MVC framework ...

Read More »

Spring NamespaceHandler Example

This article will discuss one of the most common configuration problems in the spring framework i.e. ‘A namespace handler for one of the spring namespaces is not found’. Most of the times, this means that one particular spring jar is missing from the classpath. So, let’s go over what these missing schemas might be, and what the missing dependency is ...

Read More »

Spring JdbcTemplate CRUD Operations Tutorial

Spring JdbcTemplate is a powerful mechanism to connect to the database and execute SQL queries. In this tutorial, we will discuss the Spring JdbcTemplate and we will cover all the CRUD operations.                     Table Of Contents 1. Introduction 1.1 Spring Framework 1.2 Why to use Spring Jdbc Template? 1.3 Spring Jdbc ...

Read More »

Using MockRestServiceServer to Test a REST Client

This article is an example in using MockRestServiceServer to test a REST client. MockRestServiceServer is a part of the Spring library for testing. It is the main entry point for client-side REST testing. It provides mock responses from expected requests through the RestTemplate. It eliminates the use of an actual server and thus speeds up the testing process. With its ...

Read More »

Spring Framework GraphQL Tutorial

GraphQL is a relatively new concept from Facebook that is billed as an alternative to REST for Web APIs. This article will give an introduction to setting up a GraphQL server using Spring Boot so that it can be added to the existing applications or it can be used in new ones. Table Of Contents 1. Introduction 1.1 Spring Framework ...

Read More »

Spring Security 4 Tutorial

Spring Security is one of the most important modules of the Spring framework. It enables the developers to integrate the security features easily and in a managed way. In the following example, we will show how to implement Spring Security in a Spring MVC application.                 Table Of Contents 1. Introduction 1.1 Spring ...

Read More »

Spring MVC RequestMapping Example

Spring MVC is one of the most important modules of the Spring framework. In this article, we are going to discuss one of the main annotation in Spring MVC i.e. @RequestMapping which is used to map a web request to Spring Controller’s handler methods.                 1. Introduction 1.1 Spring Framework Spring is an ...

Read More »

Spring MVC Redirect Example

Spring MVC is one of the most important modules of the Spring framework. In this example, we will show how to write a simple Spring based web application which makes use of redirect to transfer an HTTP request to another page.                 1. Introduction 1.1 Spring Framework Spring is an open-source framework created ...

Read More »

Spring MVC Architecture Overview Example

In this example, we will build a Hello World web application using the Java Spring MVC framework. Java Spring MVC is one of the most important modules of the Spring framework. It builds on the powerful Spring Inversion of Control (IoC) container and makes extensive use of the container features to simplify its configuration. 1. Introduction 1.1 Spring Framework Spring ...

Read More »