- 浏览: 73418 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
george.gu:
lqjacklee 写道怎么解决。。 First: Conf ...
Bad version number in .class file -
lqjacklee:
怎么解决。。
Bad version number in .class file -
flyqantas:
would you pleade left more mate ...
UML Extension
AOP References
- Please refer to Spring Framework AOP specification site for more details on spring aop concepts.
- General introduction to Aspect-Oriented Programming
Aspect
Aspect is "cross-cutting concern". For example:
- Transaction Management Aspect
- Logging Aspect
- Security Aspect
Transaction Management Aspect
Transaction is required in many enterprise application:
- Before launch an operation, we should initialize an transaction to make sure the operation is atomic.
- After each operation, we should make sure transaction is submit.
- If any error happen during operation, we should make sure the Transaction rollback.
- ...
All of those requirements are common to each enterprise applications regardless of the business requirements.
Security Aspect
There are many approaches to authenticate and authorize user's permission to manipulate specific system resources. Security Aspect can solve the scenario like:
- Some Methods can only be invoked by invoker who has specific permission. And all those checkings are before invocation.
- Some User Interface or operation can only be show to specific user roles.
- ...
For example, Acegi and Spring security will manage security with AOP ascpect.
Logging Aspect
Logging is necessary requirement for all enterprise applications. We can use logging to trace/monitor the system status:
- Trace methods invocation start/complete/failed...
- Trace user operation on the server...
- Trace data transmitting state during business logical...
- ...
All those functions are common and not related to any business. We can manage logging in AOP aspect.
Pointcut
In Spring AOP, "Pointcut" define the points where aspect operations should be injected during business logical running. In Spring AOP, a join point always represents a method execution.
There are several kinds of Pointcut definition.
The execution of any public method
execution(public * *(..))
The execution of any method with a name beginning with "set"
execution(* set*(..))
The execution of any method defined by the AccountService interface
execution(* com.xyz.service.AccountService.*(..))
The execution of the process method taking a String in argument
execution(public * com.xyz.service.BillingService.process(String))
The execution of the process method taking any argument, returning an Integer
execution(public Integer com.xyz.service.BillingService.process(..))
发表评论
-
java.util.ConcurrentModificationException
2012-03-20 18:10 1654Where ConcurrentModificationExc ... -
Memory Leak analyze
2012-03-12 06:21 924Shallow Heap Size Shallow siz ... -
Scalable and Easy to Integrate (3): Share Data with external Server by LDAP
2012-02-28 05:25 0Share Data with external Server ... -
Scalable and Easy to Integrate (2): Linstener
2012-02-28 05:20 0descript listener pattern in pr ... -
Scalable and Easy to Integrate (1): Callback
2012-02-28 05:19 0Descript the callback method de ... -
Java Exception Design
2012-02-18 05:36 843Talk something used to happen i ... -
JMX in Weblogic
2012-02-17 19:20 1650Here I would like to list some ... -
Java String Charset Encoding
2012-02-09 00:28 3021Charset Charset is a named map ... -
Weblogic 11g JSP cache
2012-01-31 00:41 2889Normally, jsp_servlet classes ... -
2011,这样走过!
2011-12-31 06:01 101月11日,琪琪从巴黎 ... -
Security Manager
2011-12-20 21:20 0http://journals.ecs.soton.ac ... -
Unique Identifier generation in Java Application
2011-12-23 06:17 736During application design, ther ... -
WorkManager in Weblogic and Multiple Thread design in Enterprise Application
2011-12-15 05:25 0Descrip how to use workmanager ... -
JMX Usage
2011-12-13 06:22 828There is long times since last ... -
Using Taglib to Implement Dynamic UI
2011-12-12 06:13 949What's Taglib? Taglib is a JSP ... -
EJB: Singleton in EJB
2011-12-06 00:58 0When I was using EJB to impleme ... -
Design Pattern in My Project: Factory
2011-12-02 05:56 0Design Pattern in My Project: F ... -
UML Extension
2011-12-15 06:06 973Classes Relationship in UML As ... -
Design Tools: Basic Flow Chart
2011-12-02 05:53 0Discuss my understanding in bas ... -
Cluster Design
2011-12-02 05:51 0Cluster Design
相关推荐
赠送jar包:spring-aop-5.0.10.RELEASE.jar; 赠送原API文档:spring-aop-5.0.10.RELEASE-javadoc.jar; 赠送源代码:spring-aop-5.0.10.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.0.10.RELEASE....
spring-aop-1.1.1.jar spring-aop-1.2.6.jar spring-aop-1.2.9.jar spring-aop-2.0.2.jar spring-aop-2.0.6.jar spring-aop-2.0.7.jar spring-aop-2.0.8.jar spring-aop-2.0.jar spring-aop-2.5.1.jar spring-aop-...
赠送jar包:spring-aop-5.2.0.RELEASE.jar; 赠送原API文档:spring-aop-5.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-aop-5.2.0.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.2.0.RELEASE.pom;...
3. **工厂方法模式(Factory Method)**:Spring AOP中的`ProxyFactory`是一个典型的工厂方法模式实现,它根据不同的条件创建不同的代理对象,将实例化推迟到子类,提供了更大的灵活性。 4. **原型模式(Prototype...
Spring AOP(面向切面编程)是Spring框架的重要组成部分,它提供了一种强大的方式来实现横切关注点,如日志、事务管理、性能监控等,而无需侵入业务代码。下面将详细介绍Spring AOP的注解方式和XML配置方式。 ### ...
赠送jar包:spring-aop-5.0.8.RELEASE.jar; 赠送原API文档:spring-aop-5.0.8.RELEASE-javadoc.jar; 赠送源代码:spring-aop-5.0.8.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.0.8.RELEASE.pom;...
Spring AOP(面向切面编程)是Spring框架的重要组成部分,它提供了一种模块化和声明式的方式来处理系统中的交叉关注点问题,如日志、事务管理、安全性等。本示例将简要介绍如何在Spring应用中实现AOP,通过实际的...
赠送jar包:spring-aop-5.3.15.jar; 赠送原API文档:spring-aop-5.3.15-javadoc.jar; 赠送源代码:spring-aop-5.3.15-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.3.15.pom; 包含翻译后的API文档:spring...
赠送jar包:spring-aop-5.3.12.jar; 赠送原API文档:spring-aop-5.3.12-javadoc.jar; 赠送源代码:spring-aop-5.3.12-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.3.12.pom; 包含翻译后的API文档:spring...
3. **配置AOP** - **XML配置**:在Spring的配置文件中,可以使用<aop:config>标签来定义切面,<aop:pointcut>定义切点,<aop:advisor>定义通知,<aop:aspect>将切点和通知关联起来。 - **注解配置**:Spring 2.5...
赠送jar包:spring-aop-5.3.10.jar; 赠送原API文档:spring-aop-5.3.10-javadoc.jar; 赠送源代码:spring-aop-5.3.10-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.3.10.pom; 包含翻译后的API文档:spring...
赠送jar包:spring-aop-5.3.15.jar; 赠送原API文档:spring-aop-5.3.15-javadoc.jar; 赠送源代码:spring-aop-5.3.15-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.3.15.pom; 包含翻译后的API文档:spring...
spring-aop-6.0.2.jar
赠送jar包:spring-aop-5.2.15.RELEASE.jar; 赠送原API文档:spring-aop-5.2.15.RELEASE-javadoc.jar; 赠送源代码:spring-aop-5.2.15.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.2.15.RELEASE....
Java流行框架源码分析:Spring源码、SpringBoot源码、SpringAOP源码、SpringSecurity源码、SpringSecurity OAuth2源码、JDK源码、Netty源码
3. **灵活的通知模型**:Spring AOP提供了多种类型的通知,包括around、before、after returning、after throwing等,使得开发者可以根据实际需求选择最适合的通知类型。 4. **丰富的切入点表达式语言**:Spring ...
赠送jar包:spring-aop-4.2.2.RELEASE.jar; 赠送原API文档:spring-aop-4.2.2.RELEASE-javadoc.jar; 赠送源代码:spring-aop-4.2.2.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-aop-4.2.2.RELEASE.pom;...
3. `<aop:pointcut>`:定义一个切点表达式,匹配特定的方法或类。 4. `<aop:before>`、`<aop:after>`、`<aop:around>`、`<aop:after-returning>`和`<aop:after-throwing>`:分别用于定义在目标方法执行前、后、环绕...
Spring Boot AOP(面向切面编程)是一种强大的设计模式,它允许我们在不修改现有代码的情况下,插入额外的功能或监控代码。在Spring框架中,AOP主要用于日志记录、事务管理、性能统计等场景。本示例是关于如何在...
赠送jar包:spring-aop-5.1.3.RELEASE.jar; 赠送原API文档:spring-aop-5.1.3.RELEASE-javadoc.jar; 赠送源代码:spring-aop-5.1.3.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-aop-5.1.3.RELEASE.pom;...