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