码迷,mamicode.com
首页 > 编程语言 > 详细

Spring AOP 简单理解

时间:2016-12-11 23:03:54      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:lan   main   ace   list   配置文件   bsp   接口   src   public   

AOP技术即(面向切面编程)技术是在面向对象编程基础上的发展,AOP技术是对所有对象或一类对象编程。核心是在不增加代码的基础上,还增加了新的功能。AOP编程在开发框架本身用的比较多,而实际项目中,用的比较少。它是将分散在各个业务逻辑代码中的相同代码抽取出来形成一个独立的模块。

1、定义AOP术语

(1)切面(aspect):要实现的交叉功能,是系统模块化的一个切面或领域。

(2)通知(advice):切面的具体实现,包含五类通知。

(3)连接点(jointpoint):应用程序执行过程中插入切面的地点。

(4)切点(cutpoint):定义通知应该应用哪些连接点。

(5)引入(introduction):为类添加新方法和属性。

(6)目标对象(target):通知逻辑的织入目标类。

(7)代理(proxy):将通知应用到目标对象后创建的对象,应用系统的其他部分不用为了支持代理对象而改变

(8)织入(weaving):将切面应用到目标对象从而创建一个新代理对象的过程。

 

2、AOP原理和实例

(1)基础接口和类的实现:

Java代码  
  1. package com.jasson.aop;  
  2.   
  3. public interface TestServiceInter1 {  
  4.   
  5.     public void sayHello();  
  6. }  
  7.   
  8.   
  9. package com.jasson.aop;  
  10.   
  11. public interface TestServiceInter2 {  
  12.   
  13.     public void sayBye();  
  14.       
  15.     public void sayHi();  
  16. }  

 (2)实现类如下:

Java代码  
  1. package com.jasson.aop;  
  2.   
  3. public class TestService implements TestServiceInter1,TestServiceInter2 {  
  4.   
  5.     public void sayHello() {  
  6.         System.out.println("sayHello() method ");  
  7.     }  
  8.   
  9.     public void sayBye() {  
  10.         System.out.println("sayBye() method");  
  11.     }  
  12.       
  13.     public void sayHi() {  
  14.         System.out.println("sayHi() method");  
  15.     }  
  16. }  

 

(1)前置通知:要求在每个方法调用前进行日志记录,则用的前置通知,定义如下:

Java代码  
  1. package com.jasson.aop;  
  2.   
  3. import java.lang.reflect.Method;  
  4.   
  5. import org.springframework.aop.MethodBeforeAdvice;  
  6.   
  7. public class MyMethodBeforeAdvice implements MethodBeforeAdvice {  
  8.   
  9.     /** 
  10.      * method: 方法名 
  11.      * args: 输入参数 
  12.      * target: 目标对象 
  13.      */  
  14.     public void before(Method method, Object[] args, Object target)  
  15.             throws Throwable {  
  16.         System.out.println("前置通知调用 记录日志..."+method.getName());  
  17.     }  
  18. }  

 

配置文件如下:

 

Xml代码  
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.         xmlns:context="http://www.springframework.org/schema/context"  
  5.         xmlns:tx="http://www.springframework.org/schema/tx"  
  6.         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd  
  7.                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd  
  8.                 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"   
  9.                 >  
  10. <!-- 配置被代理的对象,即目标对象 -->  
  11. <bean id="testService" class="com.jasson.aop.TestService" />  
  12. <!-- 配置前置通知 -->  
  13. <bean id="myMethodBeforeAdvice" class="com.jasson.aop.MyMethodBeforeAdvice" />  
  14. <!-- 配置代理对象 -->  
  15. <bean id="proxyFactoryBean" class="org.springframework.aop.framework.ProxyFactoryBean">  
  16.     <!-- 代理接口集 -->  
  17.     <property name="proxyInterfaces">  
  18.         <list>  
  19.             <value>com.jasson.aop.TestServiceInter1</value>  
  20.             <value>com.jasson.aop.TestServiceInter2</value>  
  21.         </list>  
  22.     </property>  
  23.     <!-- 把通知织入到代理对象  -->  
  24.     <property name="interceptorNames">  
  25.         <!-- 相当于包MyMethodBeforeAdvice前置通知和代理对象关联,我们也  
  26.         可以把通知看出拦截器,struts2核心拦截器 -->  
  27.         <list>  
  28.             <value>myMethodBeforeAdvice</value>  
  29.         </list>  
  30.     </property>  
  31.     <!-- 配置被代理对象,即目标对象 -->  
  32.     <property name="target" ref="testService"/>  
  33. </bean>  
  34. </beans>  

 

Java代码  
  1. package com.jasson.aop;  
  2.   
  3. import org.springframework.context.ApplicationContext;  
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;  
  5.   
  6. public class App1 {  
  7.   
  8.     /** 
  9.      * @param args 
  10.      */  
  11.     public static void main(String[] args) {  
  12.         // TODO Auto-generated method stub  
  13.         ApplicationContext ac=new ClassPathXmlApplicationContext("com/jasson/aop/beans.xml");  
  14.         TestServiceInter1 ts=(TestServiceInter1) ac.getBean("proxyFactoryBean");  
  15.         ts.sayHello();  
  16.         System.out.println("*******************************************");  
  17.         ((TestServiceInter2)ts).sayBye();  
  18.         System.out.println("*******************************************");  
  19.         ((TestServiceInter2)ts).sayHi();  
  20.     }  
  21.   
  22. }  

 

 执行结果如下:

Java代码  
  1. 31-May-2012 18:19:53 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons  
  2. INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@c8f6f8: defining beans [testService,myMethodBeforeAdvice,myAfterReturningAdvice,myMethodInterceptor,myThrowsAdvice,proxyFactoryBean]; root of factory hierarchy  
  3. 前置通知调用 记录日志...sayHello  
  4. sayHello() method   
  5. *******************************************  
  6. 前置通知调用 记录日志...sayBye  
  7. sayBye() method  
  8. *******************************************  
  9. 前置通知调用 记录日志...sayHi  
  10. sayHi() method  

 

(2)后置通知:要求在调用每个方法后执行的功能,例如在调用每个方法后关闭资源

 

Java代码  
  1. package com.jasson.aop;  
  2.   
  3. import java.lang.reflect.Method;  
  4.   
  5. import org.springframework.aop.AfterReturningAdvice;  
  6.   
  7. public class MyAfterReturningAdvice implements AfterReturningAdvice {  
  8.   
  9.     @Override  
  10.     public void afterReturning(Object returnValue, Method method, Object[] arg,  
  11.             Object target) throws Throwable {  
  12.         // TODO Auto-generated method stub  
  13.         System.out.println("后置通知调用,关闭资源..."+method.getName());  
  14.     }  
  15. }  

 bean 配置如下:

Xml代码  
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.         xmlns:context="http://www.springframework.org/schema/context"  
  5.         xmlns:tx="http://www.springframework.org/schema/tx"  
  6.         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd  
  7.                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd  
  8.                 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"   
  9.                 >  
  10. <!-- 配置被代理的对象,即目标对象 -->  
  11. <bean id="testService" class="com.jasson.aop.TestService" />  
  12. <!-- 配置前置通知 -->  
  13. <bean id="myMethodBeforeAdvice" class="com.jasson.aop.MyMethodBeforeAdvice" />  
  14. <!-- 配置后置通知 -->  
  15. <bean id="myAfterReturningAdvice" class="com.jasson.aop.MyAfterReturningAdvice" />  
  16. <!-- 配置代理对象 -->  
  17. <bean id="proxyFactoryBean" class="org.springframework.aop.framework.ProxyFactoryBean">  
  18.     <!-- 代理接口集 -->  
  19.     <property name="proxyInterfaces">  
  20.         <list>  
  21.             <value>com.jasson.aop.TestServiceInter1</value>  
  22.             <value>com.jasson.aop.TestServiceInter2</value>  
  23.         </list>  
  24.     </property>  
  25.     <!-- 把通知织入到代理对象  -->  
  26.     <property name="interceptorNames">  
  27.         <!-- 相当于包MyMethodBeforeAdvice前置通知和代理对象关联,我们也  
  28.         可以把通知看出拦截器,struts2核心拦截器 -->  
  29.         <list>  
  30.             <value>myMethodBeforeAdvice</value>  
  31.             <value>myAfterReturningAdvice</value>  
  32.         </list>  
  33.     </property>  
  34.     <!-- 配置被代理对象,即目标对象 -->  
  35.     <property name="target" ref="testService"/>  
  36. </bean>  
  37. </beans>  

 

执行结果如下:

 

 

Java代码  
  1. INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@122cdb6: defining beans [testService,myMethodBeforeAdvice,myAfterReturningAdvice,myMethodInterceptor,myThrowsAdvice,proxyFactoryBean]; root of factory hierarchy  
  2. 前置通知调用 记录日志...sayHello  
  3. sayHello() method   
  4. 后置通知调用,关闭资源...sayHello  
  5. *******************************************  
  6. 前置通知调用 记录日志...sayBye  
  7. sayBye() method  
  8. 后置通知调用,关闭资源...sayBye  
  9. *******************************************  
  10. 前置通知调用 记录日志...sayHi  
  11. sayHi() method  
  12. 后置通知调用,关闭资源...sayHi  

 

(3)环绕通知:指在某个具体的方法中,添加相应的操作

Java代码  技术分享
  1. package com.jasson.aop;  
  2.   
  3. import org.aopalliance.intercept.MethodInterceptor;  
  4. import org.aopalliance.intercept.MethodInvocation;  
  5.   
  6. public class MyMethodInterceptor implements MethodInterceptor {  
  7.   
  8.     @Override  
  9.     public Object invoke(MethodInvocation arg) throws Throwable {  
  10.         // TODO Auto-generated method stub  
  11.         System.out.println("环绕通知调用方法前");  
  12.         Object obj = arg.proceed();  
  13.         System.out.println("环绕通知调用方法后");  
  14.         return obj;  
  15.     }  
  16. }  

 

配置文件如下:

Xml代码  
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.         xmlns:context="http://www.springframework.org/schema/context"  
  5.         xmlns:tx="http://www.springframework.org/schema/tx"  
  6.         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd  
  7.                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd  
  8.                 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"   
  9.                 >  
  10. <!-- 配置被代理的对象,即目标对象 -->  
  11. <bean id="testService" class="com.jasson.aop.TestService" />  
  12. <!-- 配置前置通知 -->  
  13. <bean id="myMethodBeforeAdvice" class="com.jasson.aop.MyMethodBeforeAdvice" />  
  14. <!-- 配置后置通知 -->  
  15. <bean id="myAfterReturningAdvice" class="com.jasson.aop.MyAfterReturningAdvice" />  
  16. <!-- 配置环绕通知 -->  
  17. <bean id="myMethodInterceptor" class="com.jasson.aop.MyMethodInterceptor" />  
  18. <!-- 配置代理对象 -->  
  19. <bean id="proxyFactoryBean" class="org.springframework.aop.framework.ProxyFactoryBean">  
  20.     <!-- 代理接口集 -->  
  21.     <property name="proxyInterfaces">  
  22.         <list>  
  23.             <value>com.jasson.aop.TestServiceInter1</value>  
  24.             <value>com.jasson.aop.TestServiceInter2</value>  
  25.         </list>  
  26.     </property>  
  27.     <!-- 把通知织入到代理对象  -->  
  28.     <property name="interceptorNames">  
  29.         <!-- 相当于包MyMethodBeforeAdvice前置通知和代理对象关联,我们也  
  30.         可以把通知看出拦截器,struts2核心拦截器 -->  
  31.         <list>  
  32.             <value>myMethodBeforeAdvice</value>  
  33.             <value>myAfterReturningAdvice</value>  
  34.             <value>myMethodInterceptor</value>  
  35.         </list>  
  36.     </property>  
  37.     <!-- 配置被代理对象,即目标对象 -->  
  38.     <property name="target" ref="testService"/>  
  39. </bean>  
  40. </beans>  

 执行结果如下:

Java代码  
  1. INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1ce2dd4: defining beans [testService,myMethodBeforeAdvice,myAfterReturningAdvice,myMethodInterceptor,proxyFactoryBean]; root of factory hierarchy  
  2. 前置通知调用 记录日志...sayHello  
  3. 环绕通知调用方法前  
  4. sayHello() method   
  5. 环绕通知调用方法后  
  6. 后置通知调用,关闭资源...sayHello  
  7. *******************************************  
  8. 前置通知调用 记录日志...sayBye  
  9. 环绕通知调用方法前  
  10. sayBye() method  
  11. 环绕通知调用方法后  
  12. 后置通知调用,关闭资源...sayBye  
  13. *******************************************  
  14. 前置通知调用 记录日志...sayHi  
  15. 环绕通知调用方法前  
  16. sayHi() method  
  17. 环绕通知调用方法后  
  18. 后置通知调用,关闭资源...sayHi  

 (4)异常通知:当发生异常时,要执行的通知

Java代码  
  1. package com.jasson.aop;  
  2.   
  3. import java.lang.reflect.Method;  
  4.   
  5. import org.springframework.aop.ThrowsAdvice;  
  6.   
  7. public class MyThrowsAdvice implements ThrowsAdvice {  
  8.   
  9.     public void afterThrowing(Method method, Object[] os, Object target,  
  10.             Exception exception) {  
  11.   
  12.         System.out.println("异常通知产生异常,进行处理" + exception.getMessage());  
  13.     }  
  14. }  

 

 

Java代码  
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.         xmlns:context="http://www.springframework.org/schema/context"  
  5.         xmlns:tx="http://www.springframework.org/schema/tx"  
  6.         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd  
  7.                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd  
  8.                 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"   
  9.                 >  
  10. <!-- 配置被代理的对象,即目标对象 -->  
  11. <bean id="testService" class="com.jasson.aop.TestService" />  
  12. <!-- 配置前置通知 -->  
  13. <bean id="myMethodBeforeAdvice" class="com.jasson.aop.MyMethodBeforeAdvice" />  
  14. <!-- 配置后置通知 -->  
  15. <bean id="myAfterReturningAdvice" class="com.jasson.aop.MyAfterReturningAdvice" />  
  16. <!-- 配置环绕通知 -->  
  17. <bean id="myMethodInterceptor" class="com.jasson.aop.MyMethodInterceptor" />  
  18. <!-- 配置异常通知 -->  
  19. <bean id="myThrowsAdvice" class="com.jasson.aop.MyThrowsAdvice" />  
  20. <!-- 配置代理对象 -->  
  21. <bean id="proxyFactoryBean" class="org.springframework.aop.framework.ProxyFactoryBean">  
  22.     <!-- 代理接口集 -->  
  23.     <property name="proxyInterfaces">  
  24.         <list>  
  25.             <value>com.jasson.aop.TestServiceInter1</value>  
  26.             <value>com.jasson.aop.TestServiceInter2</value>  
  27.         </list>  
  28.     </property>  
  29.     <!-- 把通知织入到代理对象  -->  
  30.     <property name="interceptorNames">  
  31.         <!-- 相当于包MyMethodBeforeAdvice前置通知和代理对象关联,我们也  
  32.         可以把通知看出拦截器,struts2核心拦截器 -->  
  33.         <list>  
  34.             <value>myMethodBeforeAdvice</value>  
  35.             <value>myAfterReturningAdvice</value>  
  36.             <value>myMethodInterceptor</value>  
  37.             <value>myThrowsAdvice</value>  
  38.         </list>  
  39.     </property>  
  40.     <!-- 配置被代理对象,即目标对象 -->  
  41.     <property name="target" ref="testService"/>  
  42. </bean>  

 

Java代码  
  1. package com.jasson.aop;  
  2.   
  3. public class TestService implements TestServiceInter1,TestServiceInter2 {  
  4.   
  5.     public void sayHello() {  
  6.         System.out.println("sayHello() method ");  
  7.     }  
  8.   
  9.     public void sayBye() {  
  10.         System.out.println("sayBye() method");  
  11.     }  
  12.       
  13.     public void sayHi() {  
  14.         int a =10/0;  
  15.         System.out.println("sayHi() method");  
  16.     }  
  17. }  

 

执行结果如下:

Java代码  
  1. INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1ce2dd4: defining beans [testService,myMethodBeforeAdvice,myAfterReturningAdvice,myMethodInterceptor,myThrowsAdvice,proxyFactoryBean]; root of factory hierarchy  
  2. 前置通知调用 记录日志...sayHello  
  3. 环绕通知调用方法前  
  4. sayHello() method   
  5. 环绕通知调用方法后  
  6. 后置通知调用,关闭资源...sayHello  
  7. *******************************************  
  8. 前置通知调用 记录日志...sayBye  
  9. 环绕通知调用方法前  
  10. sayBye() method  
  11. 环绕通知调用方法后  
  12. 后置通知调用,关闭资源...sayBye  
  13. *******************************************  
  14. 前置通知调用 记录日志...sayHi  
  15. 环绕通知调用方法前  
  16. 异常通知产生异常,进行处理/ by zero  
  17. Exception in thread "main" java.lang.ArithmeticException: / by zero  

 

(5)上面的通知都是针对每个方法的,如果只是对单个或者一类的方法进行相应处理的时,可采用名字或者正则表达式的方式进行处理

配置如下:

Xml代码  
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <beans xmlns="http://www.springframework.org/schema/beans"  
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  4.         xmlns:context="http://www.springframework.org/schema/context"  
  5.         xmlns:tx="http://www.springframework.org/schema/tx"  
  6.         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd  
  7.                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd  
  8.                 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"   
  9.                 >  
  10. <!-- 配置被代理的对象,即目标对象 -->  
  11. <bean id="testService" class="com.jasson.aop.TestService" />  
  12. <!-- 配置前置通知 -->  
  13. <bean id="myMethodBeforeAdvice" class="com.jasson.aop.MyMethodBeforeAdvice" />  
  14. <!-- 配置后置通知 -->  
  15. <bean id="myAfterReturningAdvice" class="com.jasson.aop.MyAfterReturningAdvice" />  
  16. <!-- 配置环绕通知 -->  
  17. <bean id="myMethodInterceptor" class="com.jasson.aop.MyMethodInterceptor" />  
  18. <!-- 配置异常通知 -->  
  19. <bean id="myThrowsAdvice" class="com.jasson.aop.MyThrowsAdvice" />  
  20.   
  21. <!-- 通知与正则表达式切入点一起配置 -->    
  22. <!-- Advisor等于切入点加通知,所有say开头的方法添加前置通知 -->    
  23. <bean id="regexpPointcutAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">    
  24.     <property name="advice" ref="myMethodBeforeAdvice"/>    
  25.     <property name="patterns">    
  26.         <list>    
  27.             <value>.*say.*</value>    
  28.         </list>    
  29.     </property>    
  30. </bean>    
  31.   
  32. <!-- 方法名匹配切入点配置器:只对 sayHello方法添加环绕通知-->    
  33. <bean id="namePointcutAdvisor" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">    
  34.     <property name="advice" ref="myMethodInterceptor"/>    
  35.     <property name="mappedNames">    
  36.         <list>    
  37.             <value>sayHello</value>    
  38.         </list>    
  39.     </property>    
  40. </bean>   
  41.   
  42. <!-- 配置代理对象 -->  
  43. <bean id="proxyFactoryBean" class="org.springframework.aop.framework.ProxyFactoryBean">  
  44.     <!-- 代理接口集 -->  
  45.     <property name="proxyInterfaces">  
  46.         <list>  
  47.             <value>com.jasson.aop.TestServiceInter1</value>  
  48.             <value>com.jasson.aop.TestServiceInter2</value>  
  49.         </list>  
  50.     </property>  
  51.     <!-- 把通知织入到代理对象  -->  
  52.     <property name="interceptorNames">  
  53.         <!-- 相当于包MyMethodBeforeAdvice前置通知和代理对象关联,我们也  
  54.         可以把通知看出拦截器,struts2核心拦截器 -->  
  55.         <list>  
  56.             <value>namePointcutAdvisor</value>  
  57.             <value>myAfterReturningAdvice</value>  
  58.             <value>regexpPointcutAdvisor</value>  
  59.             <value>myThrowsAdvice</value>  
  60.         </list>  
  61.     </property>  
  62.     <!-- 配置被代理对象,即目标对象 -->  
  63.     <property name="target" ref="testService"/>  
  64. </bean>  
  65. </beans>  

 

执行结果如下:

Java代码  
  1. INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1ef9157: defining beans [testService,myMethodBeforeAdvice,myAfterReturningAdvice,myMethodInterceptor,myThrowsAdvice,regexpPointcutAdvisor,namePointcutAdvisor,proxyFactoryBean]; root of factory hierarchy  
  2. 环绕通知调用方法前  
  3. 前置通知调用 记录日志...sayHello  
  4. sayHello() method   
  5. 后置通知调用,关闭资源...sayHello  
  6. 环绕通知调用方法后  
  7. *******************************************  
  8. 前置通知调用 记录日志...sayBye  
  9. sayBye() method  
  10. 后置通知调用,关闭资源...sayBye  
  11. *******************************************  
  12. 前置通知调用 记录日志...sayHi  
  13. 异常通知产生异常,进行处理/ by zero  
  14. Exception in thread "main" java.lang.ArithmeticException: / by zero  

 






Spring AOP 简单理解

标签:lan   main   ace   list   配置文件   bsp   接口   src   public   

原文地址:http://www.cnblogs.com/jeffen/p/6160802.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!