Spring AOP面向切面编程

11. Aspect Oriented Programming with Spring
11.1 Introduction
Aspect-Oriented Programming (AOP) complements Object-Oriented Programming (OOP) by providing
another way of thinking about program structure. The key unit of modularity in OOP is the class, whereas
in AOP the unit of modularity is the
aspect. Aspects enable the modularization of concerns such as
transaction management that cut across multiple types and objects. (Such concerns are often termed
crosscutting concerns in AOP literature.)
One of the key components of Spring is the
AOP framework. While the Spring IoC container does not
depend on AOP, meaning you do not need to use AOP if you don’t want to, AOP complements Spring

IoC to provide a very capable middleware solution.

面向切面编程(AOP)是对面向对象编程(OOP)的一种完善,提供了另一种思考程序架构的方式。OOP的核心模块单元是类,然而在AOP中核心模块单元是切面。切面可以使模块更加关注从各种类型和对象中抽取的事物管理。

AOP是Spring中关键的组件旨之一。但是Spring IOC容器不依赖于AOP,意味这如果你不想使用AOP的话可以没必要添加这个模块。AOP完善了Spring IOC提供了很好的中间件解决思路。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值