Pages Navigation Menu

Coding is much easier than you think

Spring Tutorial for Java Beginners

 
spring logo
 
The Spring Framework is a lightweight framework for developing Java enterprise applications. It provides high performing, easily testable and reusable code. Spring handles the infrastructure as the underlying framework so that you can focus on your application.Spring is modular in design, thereby making creation, handling and linking of individual components so much easier. Spring implements Model View Container(MVC) design pattern.
 
In this tutorial, we’ll take you step by step towards mastering the spring concepts.
Here you go!!!! :)

 

Spring Basics

1. Spring framework architecture

Gives you an insight of the architectural framework of Spring.

2. Basic concepts of Spring

This link provides any beginner, a start up at the basic concepts of Spring.

3. Inversion Of Control(IOC)

The IOC container is at the core of Spring framework. Read on to understand why this was needed and how it functions.

 

Basic tutorials with spring

1. Spring set up
Eclipse IDE set up and start up configurations for Spring support.

2. First hands-on with spring

Your first attempt at creating and running spring program at its simplest.

3. JavaConfig to provide Spring metadata

The configuration metadata can also be provided using a JavaConfig file. Click on to see more.

 

Dependency Injection(DI)

1. Dependency Injection(DI) in spring

What exactly is Dependency Injection and why is it needed? What are the types of DI supported by Spring.

2. Basic example of Setter injection in spring
Basic example of setting values to attributes (of primitive Data Types to a class through the bean using setter injection

3. Basic example of Constructor injection in spring
Basic example of setting values to attributes (of primitive Data Types to a class through the bean using constructor injection

4. Setter injection for reference bean

How setter injection is done when an attribute of a class is another class.

5. Constructor injection for reference bean

How constructor injection is done when an attribute of a class is another class.

6. Constructor injection – ambiguities

Ambiguities that might arise while passing values to constructor parameters through injection.

 

Bean

1. Basics of Bean

What is a Bean and also what are the various scopes available in Bean.

2. Loading multiple configuration metadata files

How to load multiple configuration metadata files in spring.

3. Bean Scopes

Understanding the scope and life cycle of bean.

4. Bean of Singleton scope
Example of spring bean of singleton scope

5. Bean of Prototype scope
Example of spring bean of prototype scope

6. Working with Set,List,Map and Properties as attributes

Having List, set, map and properties as attributes of a bean class.

7. List FactoryBean, Set FactoryBean and Map FactoryBean

Dealing with ArrayList,LinkedList, TreeSet,HashSet,TreeMap,HashMap

8. Using life cycle events on a bean

The life cycle events of a bean can be used to set values to the attributes of a bean using the init method.

 

Spring Expression Language(spEL)

1. Basics of spEL

Gives the basics of what is spEL and what are its features.

2. Basic example using spEL

First hands on using spEL to create and run a simple program using spEL

3. simple spEL using Annotation

Basic hands on using spEL wherein, java annotations are used instead of xml for providing the configuration metadata.

4. Dot operator on Bean reference

Dot operator can be used to reference the attribues of the bean.

5. Bean Method invocation using spEL

Dot operator can further be used to place calls to methods inside the referenced bean.

6. Operators in spEL

Usage of mathematical, relational, logical and ternary operators in spEL

7. Accessing Map and List attributes in spEL

Using spEL to access Map and List attributes inside a bean.

 

Aspect Oriented Programming(AOP)

1. Basics of Aspect Oriented Programming(AOP)

What is AOP. Why is it such an integral part of Spring. Terminologies, concepts and set up.

2. Basic example of Spring AOP Concept using BeforeAdvice

Taking up BeforeAdvice to understand the basic working of AOP concept.

3. Spring AOP BeforeAdvice, AfterReturningAdvice

Adding on AfterReturningAdvice functionality to the previously tried out BeforeAdvice, with a slight change in the scenario.

4. Spring AOP – AfterThrows Advice

Implementing AfterThrows Advice to implement a functionality once a method throws an exception.

5. Spring AOP – Around Advice

A one stop shop for the above 3 mentioned functionalities. A combination of Before, AfterReturning and AfterThrows functionality in Around Advice