In this tutorial, we are going to learn about the Spring bean life cycle. It is root of Spring framework or to get into any IT company or to make any product in proper way in Spring. Definition: The sequence of changes which occurs in the spring bean is called spring bean life cycle from its initialization to its destruction. Spring life cycle tells us about how Spring bean will be maintained by Spring IOC Container. If you have notRead more
In this tutorial we are going to learn about various kinds of bean scopes which are available in Spring framework. Spring Bean Definition Beans are objects which creates the backend of your any java enterprise application. Beans are maintained by Spring IoC container. Any bean is a simple object of bean class which is instantiated, configured and also maintained by Spring IoC container. These beans have some unique configuration metadata which developers supply to Spring IOC container. Developers provide BeanRead more
In this tutorial you will learn about Spring Dependency Injection (DI) concept with example. Dependency Injection is a design pattern that allows us to remove dependencies from code so that its easier to maintain and test the code. Lets try to understand why we really need dependency injection. Consider two classes Circle and DrawShape as given below.
Circle obj = new Circle();
In this example DrawShape class is dependent on Circle class because we have used new keyword to create Circle object. In caseRead more
In this tutorial we will take a look on spring architecture and various spring modules. Spring Framework is organized into 20 modules which are arranges in 6 groups as listed below. Core Container Aspect Oriented Programming Instrumentation Web Data Access/Integration Test Lets discuss each of them in brief. Spring Architecture and Spring Modules Image Source Core Container Spring core container is the basis for the complete Spring framework. It provides an implementation for IoC that supports dependency injection. This providesRead more
In this tutorial you will learn to create Spring hello world example. I used Spring 4 in this project but the process is same for any other spring version. Before starting the tutorial make sure you have eclipse and jdk on your system. Spring Hello World Example Step 1: Create Java Project Open eclipse ide and create a java project with any name, here I am creating the project with name SpringHelloWorld. You can create the project by going toRead more