Java
Java
On the
other hand, anyone can say that it's a piece of reusable code.
Lightweight: there is a slight overhead of using the framework in
development
Inversion of Control (IoC): Spring container takes care of wiring
dependencies of various objects, instead of creating or looking for
dependent objects
Aspect Oriented Programming (AOP): Spring supports AOP to separate
business logic from system services
IoC container: it manages Spring Bean life cycle and project specific
configurations
MVC framework: that is used to create web applications or RESTful web
services, capable of returning XML/JSON responses
Transaction management: reduces the amount of boiler-plate code in
JDBC operations, file uploading, etc., either by using Java annotations or by
Spring Bean XML configuration file
Exception Handling: Spring provides a convenient API for translating
technology-specific exceptions into unchecked exceptions
At the core of the Spring Framework, lies the Spring container. The container creates
the object, wires them together, configures them and manages their complete life
cycle. The Spring container makes use of Dependency Injection to manage the
components that make up an application. The container receives instructions for
which objects to instantiate, configure, and assemble by reading the configuration
metadata provided. This metadata can be provided either by XML, Java annotations
or Java code.
Setter Injection
Constructor Injection
Field Injection
BeanFactory ApplicationContext
It is an interface defined in It is an interface defined in
org.springframework.beans.factory.BeanFactory org.springframework.context.ApplicationCo
It uses Lazy initialization It uses Eager/ Aggressive initialization
It explicitly provides a resource object using the
It creates and manages resource objects on
syntax
It doesn’t supports internationalization It supports internationalization
It doesn’t supports annotation based
It supports annotation based dependency
dependency
MVC
AOP