首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

Spring 采取xml配置

2012-08-27 
Spring 采用xml配置spring对AOP的支持(采用配置方式)1、spring的依赖包配置* SPRING_HOME/dist/spring.jar*

Spring 采用xml配置
spring对AOP的支持(采用配置方式)

1、spring的依赖包配置
* SPRING_HOME/dist/spring.jar
* SPRING_HOME/lib/log4j/log4j-1.2.14.jar
* SPRING_HOME/lib/jakarta-commons/commons-logging.jar
* SPRING_HOME/lib/aspectj/*.jar

2、具体配置
<aop:config>
<aop:aspect id="securityAspect" ref="securityHandler">
<aop:pointcut id="addAddMethod" expression="execution(* add*(..))"/>
<aop:before method="checkSecurity" pointcut-ref="addAddMethod"/>
</aop:aspect>
</aop:config>

3、了解表达式的基本语法:
* 匹配返回值
* 匹配包
* 匹配方法
* 匹配参数

热点排行