多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~ <?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.xsd"> <!--bean--> <bean id="accountService" class="com.test.service.impl.AccountServiceImpl"></bean> <!--配置Logger类--> <bean id="logger" class="com.test.utils.Logger"/> <!--配置切面--> <aop:config> <aop:aspect id="logAdvice" ref="logger"> <aop:before method="beforePrintLog" pointcut="execution(* com.test.service.impl.*.*(..))"></aop:before> <aop:after-returning method="afterReturingPrintLog" pointcut="execution(* com.test.service.impl.*.*(..))"></aop:after-returning> <aop:after-throwing method="exceptionPrintLog" pointcut="execution(* com.test.service.impl.*.*(..))"></aop:after-throwing> <aop:after method="afterPrintLog" pointcut="execution(* com.test.service.impl.*.*(..))"></aop:after> </aop:aspect> </aop:config> </beans> ~~~