传智javaee教学j2ee第9天课件_第1页
传智javaee教学j2ee第9天课件_第2页
传智javaee教学j2ee第9天课件_第3页
传智javaee教学j2ee第9天课件_第4页
传智javaee教学j2ee第9天课件_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

JAVAEE9天课件13学生老师课程教室学生老师课程授课地点(地名+教室名称班级-,毕业时班级合并(1个,或多个老师授课)ER1、 图 实例关 23ERPowerDesigner15CDMPowerDesigner15PDMPDM=PhsicsDesignModel,物理模型设计图4PowerDesigner工具介绍5ListpublicclassListSetMap_DI{privatepublicclassListSetMap_DI{privateList<String>list;privateSet<String>set;privateMap<Integer,String>Map;publicList<String>getList()return} publicvoidsetList(List<String>list)this.list=Log.getLog().info("listfor(inti=0;i<list.size();i++){Stringvalue=list.get(i);}}2<bean<beanid="sets"class="qh.set.ListSetMap_DI"<property <value><value><value>publicstaticpublicstaticvoidmain(String[]args)//构建Spring工作容器ApplicationContextatx=newListSetMap_DIsets=(ListSetMap_DI)atx.getBean("sets");Log.getLog().info("listsize="+list.size());for(inti=0;i<list.size();i++){Stringvalue=list.get(i);}}}SetpublicclassListSetMap_DI{privatepublicclassListSetMap_DI{privateList<String>list;privateSet<String>set;privateMap<Integer,String>Map;publicSet<String>getSet(){return}publicvoidsetSet(Set<String>set){ intStringvalue=it.next();}this.set=}2<bean<beanid="sets"class="qh.set.ListSetMap_DI"<property publicstaticvoidpublicstaticvoidmain(String[]args)//构建Spring工作容器ApplicationContextatx=newListSetMap_DIsets=(ListSetMap_DI)atx.getBean("sets"); intStringvalue=it.next();}}MappublicclassListSetMap_DI{privatepublicclassListSetMap_DI{privateList<String>list;privateSet<String>set;privateMap<Integer,String>map;publicMap<Integer,String>getMap()return}publicvoidsetMap(Map<Integer,String>map)this.map=Set<Integer>intfor(IntegerStringvalue=map.get(key);}}<beanid="sets"<beanid="sets"class="qh.set.ListSetMap_DI"<property<entry<entry<entry<entry<entryvalue="张减伟3publicpublicstaticvoidmain(String[]args)//构建Spring工作容器ApplicationContextatx=newListSetMap_DIsets=(ListSetMap_DI)atx.getBean("sets");Set<Integer>intfor(IntegerStringvalue=map.get(key);}}六、AOP1AOP,AspectOriented 切面面向2AOP 七、关于前置AOP125publicinterfacepublicinterfaceIStudyint上课(intteachId,StringcoureName);String上机(intteachId,StringcoureName);}publicpublicclassImplStudyimplementspublicImplStudy(){}publicString上机(intteachIdStringcoureName Strings检测return}publicint上课(intteachIdStringcoureNameintreturn}}publicclassAopBeforeToolspublicclassAopBeforeToolsimplementspublicvoidbefore(Methodmethod,// 的方Object[]funParams,//方法要运行的参数Objecttarget )throwsThrowableLog.getLog().info("方法名称,methodName="+method.getName());for(inti=0;i<funParams.length;i++){Objectparam=funParams[i];}}}}AOP前置33bean3处填空<beanid="task"class=<beanid="task"class="qh.aop.task.ImplStudy"<beanid="beforeTool"class="qh.aop.before.AopBeforeTools"<bean <property value="qh.aop.task.IStudy"<propertyname="target"ref="task"<propertypublicpublicstaticvoidmain(String[]args)ApplicationContextatx=newIStudystudy=(IStudy)atx.getBean(" Strings=study.上机(1000"java基础");intn=study.上课(1010,"大型数据库");}八、关于后置AOP12AOP5publicclassAopAfterToolimplementspublicclassAopAfterToolimplementspublicvoidafterReturning(ObjectreturnValue,Methodmethod,Object[]funParams,Objecttarget)throwsThrowable for(inti=0;i<funParams.length;i++){}}}}3bean,3个bean3处填空<beanid="task"class="qh.aop.task.ImplStudy"<beanid="afterTool"class="qh.aop.after.AopAfterTool"<beanid="<property value="qh.aop.task.IStudy"<propertyname="target"ref="task"<propertypublicpublicstaticvoidmain(String[]args)ApplicationContextatx=newIStudystudy=(IStudy)atx.getBean(" Strings=study.上机(1000"java基础");intn=study.上课(1010,"大型数据库");}publicinterfacepublicinterfaceIStudyint上课(intteachId,StringString上机(intteachId,StringcoureName)throwsException}3publicpublicclassImplStudyimplementspublicImplStudy(){}publicString上机(intteachIdStringcoureNameException thrownewException("老师编号不能大于1250...");Strings="检测:"+coureName;return}publicclassAopExceptionToolimplementspublicclassAopExceptionToolimplementspublicvoidafterThrowing(Throwablethrowable)}}}<beanid="task"class="qh.aop.task.ImplStudy"<beanid="exceptionTool"class="qh.aop.exception.AopExceptionTool"scope="prototype"/><beanid="task"class="qh.aop.task.ImplStudy"<beanid="exceptionTool"class="qh.aop.exception.AopExceptionTool"scope="prototype"/><beanid="<property value="qh.aop.task.IStudy"<propertyname="target"ref="task"<property6publicpublicstaticvoidmain(String[]args)throwsExceptionApplicationContextatx=newIStudystudy=(IStudy)atx.getBean(" Strings=study.上机(1300"java基础");}十、AOP1AOPAOP23<beanid="task"class="qh.aop.task.ImplStudy"<beanid="afterTool"<beanid="task"class="qh.aop.task.ImplStudy"<beanid="afterTool"class="qh.aop.after.AopAfterTool"<beanid="beforeTool"class="qh.aop.before.AopBeforeTools"<beanid="exceptionTool"class="qh.aop.exception.AopExceptionTool"scope="prototype"/><beanid="<property value=

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论