Spring Framework Basics Notes
Spring Framework Basics Notes
- 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:
- DI means giving an object its dependencies from outside, instead of creating them inside the class.
- 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.
- 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.
- Join point - a place in code where the aspect is applied (like a method call).