Struts+hibernate+spring Learning Experience (3) Spring

Source: Internet
Author: User
Tags aop

Mainly divided into two parts of the IOC and AOP.

IoC: Control reversal

In the use of JavaBean, we basically use the factory model, we need to plant class production objects, and then the corresponding data into the object, inevitable, factory classes and objects still have a certain degree of coupling, in the code to modify or expand the need to change several classes, The idea of the IOC is that the process of producing objects and assigning values to the factory is independent, taking the outside of the factory and using the configuration file to complete the process.

AOP: Slice-oriented programming

In front of the interceptor section of struts, in fact, the idea is that for many actions, if you use the idea of OOP before, you need to write a method to each object, which is obviously not efficient, the best solution is for the execution of a certain action, When it comes to a pointcut, we put the section code in, and the idea is that it's a facet-oriented programming idea.

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.