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 light weight 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. Light weight:

    1. Spring framework is light weight framework because of its POJO model implementation.

2. Non-invasive approach:

    1. As we know that struts forces programmer to extend 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 dependency injection concept, spring objects are loosely coupled.

4. Modular fashion:

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

5. Easy Testing:

    1. Dependency injection and POJO model makes easy to test an application.

6. Transaction management interface:

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

7. No need of application server:

    1. Struts or EJB application require application server to run but 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 Autowire tutorial:

Spring JDBC tutorial:

Spring AOP tutorial:

Spring MVC framework tutorial:

Spring SpEL tutorial:

Maven Eclipse Spring

Spring boot tutorial

Spring security tutorial