随笔分类 -  spring

摘要:配置文件或者配置类 @Configuration @ComponentScan(basePackages ={"day506AOP"}) @EnableAspectJAutoProxy(proxyTargetClass =true) public class CofigAop { } <?xml v 阅读全文
posted @ 2021-06-15 12:39 一拳超人的逆袭 阅读(49) 评论(0) 推荐(0)
摘要:/** * @author wuyimin * @create 2021-05-06-8:56 * @description AOP面向方面/切面编程:在不通过修改源代码的方式添加新的功能 * 权限判断模块配置到副本模块中 * AOP底层原理:动态代理 * 两种代理情况 * 第一种有接口:使用jdk 阅读全文
posted @ 2021-06-15 12:34 一拳超人的逆袭 阅读(65) 评论(0) 推荐(0)
摘要:配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-ins 阅读全文
posted @ 2021-06-15 12:19 一拳超人的逆袭 阅读(105) 评论(0) 推荐(0)
摘要:测试类: //测试工厂bean 单多实例 @Test public void test01(){ ApplicationContext context=new ClassPathXmlApplicationContext("503bean5.xml"); MyBean myBean1 = conte 阅读全文
posted @ 2021-06-15 11:20 一拳超人的逆袭 阅读(74) 评论(0) 推荐(0)
摘要:实体类: public class IOCIntro { private String bName; private String bAuthor; public void setAddress(String address) { this.address = address; } private 阅读全文
posted @ 2021-06-15 11:05 一拳超人的逆袭 阅读(56) 评论(0) 推荐(0)
摘要:Spring的两个核心部分IOC:控制反转,把创建对象的过程交给Spring进行管理Aop:面向切面,不修改源代码也能进行功能增强Spring框架的特点1.方便解耦,简化开发2.Aop编程的支持3.方便程序的测试,支持junit44.方便集成各种其他框架5.降低javaEE api的使用难度6.方便 阅读全文
posted @ 2021-06-15 10:53 一拳超人的逆袭 阅读(40) 评论(0) 推荐(0)