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)
Conteúdo potencialmente sensível ou impróprio
Os exemplos servem apenas como ajuda na tradução da palavra ou da expressão procurada. Eles não são selecionados ou validados por nós e podem conter linguagem inapropriada. Pedimos que reporte exemplos que devem ser modificados ou que não devem ser exibidos. As traduções potencialmente sensivéis, impróprias ou coloquiais geralmente são marcadas em vermelho ou em laranja.