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

福州建站免费模板制作宣传片视频

福州建站免费模板,制作宣传片视频,网站开发培训要多少钱,公司网站规划概念解释#xff1a;#xff08;理解基本概念方可快速入手#xff09; 连接点#xff08;joinpoint#xff09; 被拦截到的点#xff0c;因为Spring只支持方法类型的连接点#xff0c;所以在Spring中连接点指的就是被拦截到的方法。 切入点#xff08;pointcut#x…  概念解释理解基本概念方可快速入手 连接点joinpoint 被拦截到的点因为Spring只支持方法类型的连接点所以在Spring中连接点指的就是被拦截到的方法。 切入点pointcut 切入点是指我们要对哪些连接点进行拦截的定义 通知advice 所谓通知指的就是指拦截到连接点之后要执行的代码通知分为前置、后置、异常、最终、环绕通知五类 切面aspect 是切入点和通知的结合 通知顺序 前置通知aop:before             后置通知aop:after-returning【try】             最终通知aop:after【finally】             异常通知aop:after-throwing【catch】             环绕通知aop:around             try{                 ...                 return aop:after-returning             }catch(Exception e){                 ...                 aop:after-throwing             }finally{                 ...                 aop:after             } 切点表达式         格式execution([修饰符] 返回值 报名.类名.方法名(参数))         egexecution(* com.by.service.*.*(..)) 实例演示 pom.xml: dependencies!--ioc--dependencygroupIdorg.springframework/groupIdartifactIdspring-context/artifactIdversion6.0.12/version/dependency!--支持切点表达式AOP --dependencygroupIdorg.springframework/groupIdartifactIdspring-aspects/artifactIdversion5.1.8.RELEASE/version/dependencydependencygroupIdorg.slf4j/groupIdartifactIdslf4j-log4j12/artifactIdversion1.7.19/version/dependency/dependencies UserDaoImpl: package com.by.dao;public class UserDaoImpl implements UserDao {Overridepublic void addUser(){System.out.println(insert into tb_user......);} } UserServiceImpl: package com.by.service;import com.by.dao.UserDao;public class UserServiceImpl implements UserService {private UserDao userDao;public void setUserDao(UserDao userDao) {this.userDao userDao;}Overridepublic void addUser(){userDao.addUser();System.out.println(8/0);} } MyLogActive:(增强类) /** Copyright (c) 2020, 2024, All rights reserved.**/ package com.by.advice;import org.aspectj.lang.ProceedingJoinPoint;/*** pProject: Spring - MyLogAdvice/p* pPowered by scl On 2024-01-05 15:04:11/p* p描述p** author 孙臣龙 [1846080280qq.com]* version 1.0* since 17*/ public class MyLogAdvice {public void after() {System.out.println(最终通知、、、);}public void before() {System.out.println(前置通知、。、);}public void afterReturn(){System.out.println(后置通知);}public void afterThrowing(){System.out.println(异常通知);}public void around(ProceedingJoinPoint joinPoint) {try {System.out.println(前环绕通知。。。);joinPoint.proceed();System.out.println(后环绕通知。。。);} catch (Throwable e) {throw new RuntimeException(e);}} } applicationContext.xml: ?xml version1.0 encodingUTF-8? !--注意添加约束-- beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexmlns:aophttp://www.springframework.org/schema/aopxsi:schemaLocationhttp://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop.xsdbean iduserDao classcom.by.dao.UserDaoImpl/beanbean iduserService classcom.by.service.UserServiceImplproperty nameuserDao refuserDao/property/bean!--增强--bean idmyLogAdvice classcom.by.advice.MyLogAdvice/bean!--aop--aop:config!--切点--aop:pointcut idpointcut expressionexecution(* com.by.service.*.*(..))/!--切面--aop:aspect refmyLogAdviceaop:before methodbefore pointcut-refpointcut/aop:beforeaop:after methodafter pointcut-refpointcut/aop:afteraop:around methodaround pointcut-refpointcut/aop:aroundaop:after-returning methodafterReturn pointcut-refpointcut/aop:after-returningaop:after-throwing methodafterThrowing pointcut-refpointcut/aop:after-throwing/aop:aspect/aop:config/beans 没增强前结果展示 增强之后结果展示
http://www.hkea.cn/news/14370517/

相关文章:

  • 建设部网站投诉如何注册网站建设费用:做个网站要多少钱?
  • 贵阳查房子备案的网站免费的crm软件
  • 东莞网站如何制作新能源汽车价格表2021
  • seo体系网站的建设及优化网站 例
  • 云平台网站叫什么wordpress建站多用户
  • 佛山网站建设计简单好看个人主页网站模板
  • 做 爱 网站小视频服装线上结合线下的推广方案
  • 做网站机构wordpress关闭文章摘要
  • WordPress做的网站源代码wordpress ip 跳转
  • 二级网站的建设长春seo网站排名
  • 如何做x响应式网站上海注销公司需要什么资料和流程
  • 名师工作室网站建设 意义wordpress导入演示
  • 淘宝搜索框去什么网站做如何扁平化设计网站
  • 外贸网站如何推广上海市云企业有限公司
  • 烟台网站设计公司推荐中国空间站现在有几个人
  • 低成本门户网站开发有哪些网站是用php做的
  • 怎么用视频做网站首页医院网站源码下载
  • php网站开发参考文献wordpress开发插件
  • 宜昌做网站要什么条件网站开发系统架构图
  • vps主机上新增网站泰安最好的网站建设公司
  • 做二手房网站wordpress问答社区主题
  • 杭州好的做网站公司wordpress图片主题免费下载
  • 在线名片制作网站开发设计网络
  • 网站做跳转在后天那个文件里做有自己域名的个人网站
  • 网站开发进度时间表最受欢迎的网站开发语言市场有率
  • 重庆网站建设入门培训如何做公司的网站建设
  • 青岛响应式网站设计wordpress淘宝客主题带条件筛选
  • 企业怎么建设网站网络营销模式的有形收益包括
  • .net网站服务器hao123从网上开始
  • wordpress最大的网站打开网页时网站顶部显示广告随后消失的广告怎么做