Spring Remoting: Remote Method Invocation (RMI)

Concept Overview Spring provides four ways to develop remote services. Remote services are services hosted on remote servers and accessed by clients over the network. For example, lets say you are developing a desktop application that needs to connect to a central server. The desktop application can be on various machines. you can use spring … Read more

Spring – XML Free Web Application

In this example we build a spring based XML free web application. That’s right, no XML. Why would you want an XML free web application? No reason. It just sounds cool. Although if you do it that way a couple of times, you can’t go back to XML. You wouldnt want to. probably… Step 1 … Read more

Spring View Resolver

Please see this tutorial for an introduction to Spring MVC. In This tutorial we look at the Controllers and View Resolvers. Controller The DispatcherServlet receives request and then passes on the request to the appropriate Controller. The base Controller interface receives HttpServletRequest and HttpServletResponse. Controllers are like struts Action. The implementation of Controller should be … Read more

Spring HandlerMappings

Please see this tutorial for an introduction to Spring MVC. In this tutorial we describe the various HandlerMapping classes available in Spring HandlerMapping HandlerMapping is an interface that is implemented by all Objects that map the request to the corresponding Handler Object. A HandlerExecutionChain always wraps the Handler and may also contain one or more … Read more

Spring MVC Basics

Concept Overview Spring has a well developed and highly plugable framework for Web Development. It is based on Model, View and Controller (MVC) Framework. The DispatcherServlet handles the whole show, right from intercepting the request, to delegating the request to appropriate controllers and rendering the view. It follows the FrontController design pattern. To understand the … Read more

Spring AOP – Concepts and XML Configuration

Concept Overview There are certain activities like logging, security, caching, transaction management etc. that are applicable to multiple objects in a software system. Such activities are called cross-cutting concerns . Typically, although these cross-cutting concerns are conceptually separate from the application�s business logic, the code that handle the cross-cutting concerns is often intermixed with that … Read more

Spring Factory Method

Concept Overview Normally, Spring instantiates a class and performs dependency injection. However, sometimes it may be necessary to instantiate a class via another class (usually called a Factory class). In such a scenario, Spring should not create the class on its own but simply delegate the instantiation to the Factory class. Spring provides a way … Read more

Spring Method Injection

Concept Overview In typical software development, classes depend on each other to achieve a desired functionality. e.g. An Automatic Ticket Vending Machine class depends on Ticket class to achieve the functionality of generating tickets. The dependencies need to be ‘resolved’ before the desired functionality is can be achieved. When dependency resolution is not performed by … Read more

Spring Setter Injection

What is Setter Injection in Spring Setter Injection in Spring is a type of dependency injection in which the framework injects the dependent objects into the client using a setter method. The container first calls the no argument constructor and then calls the setters. The setter based injection can work even If some dependencies have … Read more