当前位置: 首页 > news >正文

做网站ps切图15秒创意广告短片

做网站ps切图,15秒创意广告短片,哪款地图可以看到实时街景,工控软件界面设计Around的作用 既可以在目标方法之前织入增强动作#xff0c;也可以在执行目标方法之后织入增强动作#xff1b;可以决定目标方法在什么时候执行#xff0c;如何执行#xff0c;甚至可以完全阻止目标目标方法的执行#xff1b;可以改变执行目标方法的参数值#xff0c;也…Around的作用 既可以在目标方法之前织入增强动作也可以在执行目标方法之后织入增强动作可以决定目标方法在什么时候执行如何执行甚至可以完全阻止目标目标方法的执行可以改变执行目标方法的参数值也可以改变执行目标方法之后的返回值 当需要改变目标方法的返回值时只能使用Around方法 虽然Around功能强大但通常需要在线程安全的环境下使用。因此如果使用普通的Before、AfterReturing增强方法就可以解决的事情就没有必要使用Around增强处理了。 注解方式如果需要对某一方法进行增强只需要在相应的方法上添加上自定义注解即可 package com.rq.aop.common.advice;import com.rq.aop.common.annotation.MyAnnotation; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.stereotype.Component;Aspect //标注增强处理类切面类 Component //交由Spring容器管理 public class AnnotationAspect {/*可自定义切点位置针对不同切点方法上的Around()可以这样写exAround(value methodPointcut() args(..))Pointcut(value annotation(com.rq.aop.common.annotation.MyAnnotation))public void methodPointcut(){}Pointcut(value annotation(com.rq.aop.common.annotation.MyAnnotation2))public void methodPointcut2(){}*///定义增强pointcut连接点使用annotationxxx进行定义Around(value annotation(around)) //around 与 下面参数名around对应public void processAuthority(ProceedingJoinPoint point,MyAnnotation around) throws Throwable{System.out.println(ANNOTATION welcome);System.out.println(ANNOTATION 调用方法 around.methodName());System.out.println(ANNOTATION 调用类 point.getSignature().getDeclaringTypeName());System.out.println(ANNOTATION 调用类名 point.getSignature().getDeclaringType().getSimpleName());point.proceed(); //调用目标方法System.out.println(ANNOTATION login success);} }注解类 package com.rq.aop.common.annotation;import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target;Retention(RetentionPolicy.RUNTIME)//运行时有效 Target(ElementType.METHOD)//作用于方法 public interface MyAnnotation {String methodName () default ; }Controller package com.rq.aop.controller;import com.rq.aop.common.annotation.MyAnnotation; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping;Controller RequestMapping(/hello) public class HelloController {RequestMapping(/login/{name})MyAnnotation(methodName login)public void login(PathVariable String name){System.out.println(hello!name);} }运行结果: 匹配方法执行连接点方式 package com.rq.aop.common.advice;import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component;Aspect Component Order(0) //设置优先级值越低优先级越高 public class ExecutionAspect {Around(value execution(* com.rq.aop.controller..*.*(..)))public void processAuthority (ProceedingJoinPoint point)throws Throwable{System.out.println(EXECUTION welcome);System.out.println(EXECUTION 调用方法: point.getSignature().getName());System.out.println(EXECUTION 目标对象 point.getTarget());System.out.println(EXECUTION 首个参数 point.getArgs()[0]);point.proceed();System.out.println(EXECUTION success);} }eg. 任意公共方法的执行execution(public * *(…))任何一个以“set”开始的方法的执行execution(* set*(…))AccountService 接口的任意方法的执行execution(* com.xyz.service.AccountService.*(…))定义在service包里的任意方法的执行 execution(* com.xyz.service..(…))定义在service包和所有子包里的任意类的任意方法的执行execution(* com.xyz.service….(…)) 第一个表示匹配任意的方法返回值 …(两个点)表示零个或多个第一个…表示service包及其子包,第二个表示所有类, 第三个*表示所有方法第二个…表示方法的任意参数个数 定义在pointcutexp包和所有子包里的JoinPointObjP2类的任意方法的执行execution(com.test.spring.aop.pointcutexp…JoinPointObjP2.(…))) pointcutexp包里的任意类 within(com.test.spring.aop.pointcutexp.*) pointcutexp包和所有子包里的任意类within(com.test.spring.aop.pointcutexp…*) 实现了Intf接口的所有类,如果Intf不是接口,限定Intf单个类this(com.test.spring.aop.pointcutexp.Intf) 当一个实现了接口的类被AOP的时候,用getBean方法必须cast为接口类型,不能为该类的类型 带有Transactional标注的所有类的任意方法 within(org.springframework.transaction.annotation.Transactional) target(org.springframework.transaction.annotation.Transactional) 带有Transactional标注的任意方法 annotation(org.springframework.transaction.annotation.Transactional) within和target针对类的注解,annotation是针对方法的注解 参数带有Transactional标注的方法args(org.springframework.transaction.annotation.Transactional) 参数为String类型(运行是决定)的方法 args(String) 运行结果 切面执行顺序 异常
http://www.zqtcl.cn/news/263445/

相关文章:

  • 中航建设集团网站vps网站无法通过ip访问
  • 学生求职网站的需求分析怎么做江西手机版建站系统开发
  • 电商网站开发文献综述嵌入式软件开发项目
  • 网站备案怎样提交管局网站建设基本步骤
  • 国外优秀电商设计网站开发网站公司推荐
  • 国外企业网站建设模型网站建设谈客户说什么
  • 肖港网站开发公司网站的用途
  • 百度网站置顶怎么做效果图制作设计
  • 自适应企业网站用什么框架做重庆在线观看
  • 网站做301重定向的作用辽宁网站建设电话
  • 抚州市建设局官方网站高端网页设计人才
  • 移动商城网站建设 深圳北京网站建站公
  • 网站的对比免费网站建设排名
  • 织梦做的网站别人提交给我留的言我去哪里看怎样发展网站
  • 滨州公司网站建设推广地下城做解封任务的网站
  • 做国外的众筹网站北京的网站建设公司哪家好
  • 网站建设费用一年多少钱商洛城乡建设局网站
  • 网站视觉设计原则四个商城建设
  • WordPress站点添加ssl证书网站在百度无法验证码怎么办
  • 做ppt图片用的网站有哪些问题搭建网站合同
  • 杭州网站建设推荐q479185700上墙网站推广费用入什么科目
  • 天津网站建设 熊掌号设计网站大全
  • 网站建设不力 被问责上海传媒公司有哪些
  • 在线购物网站的设计阿里巴巴网站建设
  • 宿迁网站制作公司河北省建设工程协会网站
  • 美丽寮步网站建设做招聘的网站有哪些内容
  • 服装商店的网站建设要求企业所得税率
  • 南联网站建设公司注册企业查询
  • 商业网站的网址买网站服务器吗
  • 专业的单位网站开发网站开发和网页开发有什么区别