0% found this document useful (0 votes)
2 views2 pages

Spring Framework Basics Notes

The Spring Framework is a Java-based framework designed for building enterprise-level applications, emphasizing features like dependency injection, inversion of control, and aspect-oriented programming. It promotes loosely coupled code through dependency injection methods such as constructor and setter injection, while the IoC principle allows the framework to manage object creation. AOP enables separation of cross-cutting concerns, allowing common functionalities like logging to be handled independently from business logic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Spring Framework Basics Notes

The Spring Framework is a Java-based framework designed for building enterprise-level applications, emphasizing features like dependency injection, inversion of control, and aspect-oriented programming. It promotes loosely coupled code through dependency injection methods such as constructor and setter injection, while the IoC principle allows the framework to manage object creation. AOP enables separation of cross-cutting concerns, allowing common functionalities like logging to be handled independently from business logic.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Spring Framework Basics - Easy Notes

1. Spring Core Basics

- Spring Framework is a Java-based framework used to build enterprise-level applications.

- It provides support for developing Java applications easily with built-in features like dependency injection

and AOP.

- It is lightweight, modular, and follows POJO (Plain Old Java Object) programming.

- Main features:

- Dependency Injection (DI)

- Inversion of Control (IoC)

- Aspect-Oriented Programming (AOP)

2. Spring Dependency Injection (DI)

- DI means giving an object its dependencies from outside, instead of creating them inside the class.

- It helps in loosely coupled code (easier to test and maintain).

- Spring supports two types of DI:

- Constructor Injection - dependencies are passed via constructor.

- Setter Injection - dependencies are passed via setter methods.

3. Spring Inversion of Control (IoC)

- IoC is a design principle where the control of object creation is given to the framework.

- Instead of a class creating its dependencies, the Spring container creates and injects them.

- Spring uses IoC containers (like BeanFactory and ApplicationContext) to manage objects.

- Helps in building flexible and decoupled applications.

4. AOP (Aspect-Oriented Programming)

- AOP is a programming style used to separate cross-cutting concerns (like logging, security, transactions).

- Instead of writing logging code in every method, AOP allows it to be written separately and applied where

needed.

- Key concepts in AOP:

- Aspect - the common code (e.g., logging).


Spring Framework Basics - Easy Notes

- Join point - a place in code where the aspect is applied (like a method call).

- Advice - the action taken (like before or after a method).

- Pointcut - defines where the advice should apply.

You might also like