Aspect Oriented Programming (AOP) compensates the weakness of Object Oriented Programming (OOP) at applying common behavior that spans multiple non-related object models.
面向方面编程(AOP)弥补了面向对象的编程(OOP)在跨越模块行为上的不足。
The aop:config definition applies the cache advice to the appropriate points in the program by using the AspectJ pointcut expression (more information is available in Chapter 11, Aspect Oriented Programming with Spring). In the example above, all methods from the BookService are considered and the cache advice applied to them.
aop:config定义通过使用 AspectJ 切入点表达式将缓存建议应用于程序中的适当点(更多信息在第 11 章,使用 Spring 进行面向对象编程中可用)。在上面的 example 中,将考虑BookService中的所有方法,并将缓存建议应用于它们。
Spring AOP is covered in Chapter 11, Aspect Oriented Programming with Spring.
Spring AOP 涵盖在第 11 章,使用 Spring 进行面向对象编程中。
The expression defined within the <aop:pointcut/> element is an AspectJ pointcut expression; see Chapter 11, Aspect Oriented Programming with Spring for more details on pointcut expressions in Spring.
<aop:pointcut/>元素中定义的表达式是 AspectJ 切入点表达式;有关 Spring 中切入点表达式的更多详细信息,请参阅第 11 章,使用 Spring 进行面向对象编程。
Aspect Oriented Programming with Spring
使用Spring 面向切面编程
Prior to continuing, you may want to read Section 17.5.6, "Using @Transactional" and Chapter 11, Aspect Oriented Programming with Spring respectively.
在继续之前,您可能需要分别阅读第 17.5.6 节,"使用@Transactional"和第 11 章,使用 Spring 进行面向对象编程。
Focus on provides Aspect Oriented Programming(AOP) modules: Interceptor API
关注于提供面向切面编程的模块:拦截器API(Interceptor)
Potentially sensitive or inappropriate content
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.