Spring features

Non-invasive

The so-called non-invasive means, API Spring frame does not appear on the business logic, i.e., the business logic POJO. Since the business logic without Spring API, so the business logic can be quickly migrates to other frameworks Spring Framework, i.e. independent of the ambient.

# Container

Spring as a container that can manage the life cycle of objects, dependencies between objects and objects. It may be, to define the object, and other objects with dependencies provided by the configuration file.

#IoC

Inversion of control (Inversion of Control), i.e., to create the caller by the caller examples are not completed, but the completion of the Spring container, and injecting the caller.

When you apply IoC, an object dependent on other objects will be passed in through a passive, rather than the object itself to create or find the dependent objects. I.e., not dependent from the container object lookup, but when the container object initialization object request ranging will depend on the initiative passed to it.

#AOP

Aspect Oriented Programming (AOP, Aspect Orient Programming), is a programming idea, complements of object-oriented programming OOP. Many frameworks are implemented to achieve AOP programming ideas. Spring also provides rich support for aspect-oriented programming, allowing for the development of applications by separating business logic and system-level services (such as logging and transaction management). Application object is only realized they should do - to complete the business logic - nothing more. They are not responsible for other system-level concerns, such as logging or transaction support.

We can put logs, security, transaction management and other services understood as a "cut", so before these services have been directly written business logic code among which there are two bad: First, business logic is not pure; secondly these services is used repeatedly many business logic, can do stripping out multiplexing. So AOP is the solution to these problems, you can put these services spun off to form a "cut" in order to reuse, and then "cut" dynamic "weaving" to business logic, so that business logic can enjoy this "section "services.

Guess you like

Origin www.cnblogs.com/snake107/p/11914962.html