Spring Tutorial

Spring tutorial for beginners and professionals with examples in Eclipse on Basics, inversion of control (IoC), dependency injection, bean scopes, bean life cycle, inner beans, auto-wiring, different modules, aspect-oriented programming (AOP), database access (JDBC), Transaction Management, Web MVC framework, Web Flow, Exception handling and more.

Spring Framework is one of the most popular Java EE frameworks. It is an open-source and lightweight framework created by Rod Johnson in June 2003.

Core principles of Spring Framework:

  1. Aspect Oriented Programming (AOP).
  2. Dependency Injection (DI).

Advantages of Spring Framework:

1. Lightweight:

    1. Spring framework is a lightweight framework because of its POJO model implementation.

2. Non-invasive approach:

    1. As we know struts force a programmer to extend the Action Class but Spring framework doesn’t force a programmer to extend class or implement interface given by Spring API.

3. Loose Coupling:

    1. Because of the dependency injection concept, spring objects are loosely coupled.

4. Modular fashion:

    1. Spring framework is designed in a modular fashion. A programmer can use only needed modules and ignore the rest.

5. Easy Testing:

    1. Dependency injection and the POJO model make it easy to test an application.

6. Transaction management interface:

    1. Spring framework provides a transaction management interface for transaction management.

7. No need for an application server:

    1. Struts or EJB applications require an application server to run but a spring application doesn’t need an application server.

8. MVC framework:

    Spring framework is a great alternative to web MVC frameworks like Struts.

Java Spring tutorial:

Spring bean definition inheritance tutorial:

Spring dependency injection (DI) tutorial:

Spring AOP tutorial:

Spring MVC framework tutorial:

Spring SpEL tutorial:

Maven Eclipse Spring

Spring security tutorial

Spring boot tutorial

Spring Autowire tutorial:

Spring JDBC tutorial:


Alex Martin