Spring?AOP??????????????(????)
???????????? ???????[ 2015/8/13 11:46:45 ] ??????????????????
????applicationContext.xml????
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
4 xsi:schemaLocation="
5 http://www.springframework.org/schema/beans
6 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
7 http://www.springframework.org/schema/aop
8 http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
9 http://www.springframework.org/schema/context
10 http://www.springframework.org/schema/context/spring-context-3.0.xsd">
11 <aop:aspectj-autoproxy/>
12 <!-- ???????? LogAspect-->
13 <bean id="logAspect" class="com.test.LogAspect"/>
14 <!-- ???????? -->
15 <bean name="test" class="com.test.TestServiceImpl"></bean>
16 <!-- AOP???? -->
17 <aop:config>
18 <aop:aspect id="simpleApect" ref="logAspect">
19 <!-- ????????? -->
20 <aop:pointcut expression="execution(* com.test..*(..))" id="simplePointCut"/>
21 <!-- ?????? -->
22 <aop:before method="beforeShow" pointcut-ref="simplePointCut"/>
23 <aop:after method="afterShow" pointcut-ref="simplePointCut"/>
24 <!-- <aop:after-returning method="afterReturn" pointcut-ref="simplePointCut"/> -->
25 <aop:after-throwing method="doAfterThrowing" pointcut-ref="simplePointCut" throwing="ex"/>
26 </aop:aspect>
27 </aop:config>
28 </beans>
?????????????
1 package com.test;
2
3
4 import java.util.ArrayList;
5 import java.util.List;
6
7 import org.springframework.context.support.ClassPathXmlApplicationContext;
8
9 public class TestMain{
10 public static void main(String[] args) {
11 //???BeanFactory
12 ClassPathXmlApplicationContext factory = new ClassPathXmlApplicationContext("applicationContext.xml");
13 TestService test = (TestService)factory.getBean("test");
14 List l = new ArrayList();
15 l.add("param1");
16 l.add("param2");
17 l.add("param3");
18 //???ò??????
19 test.test("ok"??1??l);
20 }
21 }
?????????????????????????????????????????xml???÷?????????о?...??????????????????????????з??????ν???????????????????????
??????????????????Spring????У?Spring????????Spring AOP??????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??????????????????ù????????ù?????????????????????????????з????????????????ù????е?SVN???ù????????????汾????????cmmi???ù??????ù?????????????ù???????????(2)???ù???????????(1)SCM??????ù???????????????ù??????????????????????е????ù??????????????ù??????ù????????????汾?????????????????ù???Nginx???ù??? - ???????DCMP??????etcd?????ù?????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????