Spring Basics-01

Source: Internet
Author: User

Ioc:inversion of abbreviation,

Di:dependency injection is an instance of the callee that is injected into the caller.

AOP-oriented programming is the embodiment of the proxy mode. Spring uses the JDK's dynamic proxy by default, primarily the proxy interface, and the default Cglib proxy if the business object does not implement an interface.

Example below:

XML configuration

<!--AOP configuration--><aop:config><aop:aspect id= "Logaspect" ref= "Logservice" ><aop:pointcut id= " Targetmethod "expression=" Execution (* org.best.spring.aop.*.* (..)) "/><aop:after pointcut-ref=" TargetMethod " Method= "Dolog"/></aop:aspect></aop:config><!--Log service--><bean id= "LogService" class= " org.best.spring.xx "></bean><!--ordinary business bean--><bean id=" Targetservice "class=" Org.best.spring.xxxxx "></bean>

Utility code gets the bean:

        // Create a spring context        New Classpathxmlapplicationcontext (new string[] {"Aop/testaop.xml" });         = (Targetservice) ctx.getbean ("Targetservice");
Handling business logic ....

So here's the problem, my directory structure is:

  

How does Classpathxmlapplicationcontext read to Testaop.xml?? pending resolution, Mark

Spring Basics-01

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: info-contact@alibabacloud.com 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.