日期:2014-05-20 浏览次数:20845 次
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> <aop:config> <aop:aspect id="aspect1" ref="aspectTest"> <aop:before pointcut="execution(public String com.test.action.LoginAction.login(..))" method="before"/> </aop:aspect> </aop:config> <bean id="aspectTest" class="com.test.bean.AspectTest"/> </beans>
public String login() { System.out.println("aaa"); return SUCCESS; }