Itcast video-spring learning notes (comprehensively interpreting spring and its functions)

Source: Internet
Author: User

Thanks to the Free videos released by itcast.


The control flip application itself is not responsible for the creation and maintenance of dependent objects. the creation and maintenance of dependent objects are the responsibility of the oil external container. The control right has the application transferred to the external container, and the control right transfer is the so-called reversal.


Dependency injection refers to the Dynamic Injection of dependent objects into components by external containers during runtime.


Reduce the Coupling Degree between components and realize decoupling between different layers of software (interface injection can replace the implementation class of injection ).

You can use many services provided by containers, such as transaction management services and message services. When we use container management, developers no longer need to manually control transactions or process complex transaction propagation.

The container provides support for the singleton mode, so developers no longer need to write their own implementations.Code.

Container providesAOPIt can easily implement functions such as permission interception and runtime monitoring.

Container provides many helper classes,Jdbctemplate, hibernatetemplate.

SpringProvides integration support for mainstream application frameworks, such as integration.Hibernate, JPA, strutsTo facilitate application development.

If you useSpring,We also do not need to deal with complicated promotional activities.

The first possible business requirement isUpdateOperation andSaveCao is executing in a transaction

The second possible business requirement, regardlessUpdateOperation logs must be recorded if the operation is successful or not.


Division of lightweight and heavyweight concepts:

It mainly depends on how many services are used. The more services are used, the container should beJavaThe more work you want to do, it will inevitably affect the application release time or test run performance.

ForSpringProvides many services, but is not enabled by default. If only core services are used, they are lightweight. If most services are used, they are heavyweight.EJBThe container is because he thinks that the application providesEJBAll functions in the Specification, so it is a heavyweight.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.