摘要: Spring中容器1,BeanFactory BeanFactory是Spring中提供的最简单,最基本的容器;这个容器只提供了IoC/DI的功能;2,ApplicationContext: 也是一个接口, 继承了BeanFactory, ApplicationContext容器功能更加全面 * e 阅读全文
posted @ 2017-03-28 21:45 时间带我去旅行 阅读(198) 评论(0) 推荐(0)
摘要: Spring初见~~~~~~~~~1,导入相关jar包(beans/core);2,导入依赖包(common-logging)3,配置XML文件(作用:告诉spring帮我管理哪些bean); 1)在classpath下,application.xml/applicationContext.xml; 阅读全文
posted @ 2017-03-28 21:26 时间带我去旅行 阅读(193) 评论(0) 推荐(0)
摘要: xml配置AOP的步骤: 1,准备了一个实现接口的bean, 还有一个事务的碎片化方法的类; 2,把这两个类配置到Spring容器中; 3,配置springAOP 1)引入aop命名空间; 2)配置AOP,格式如下 <aop:config> <aop:point-cut expression="" 阅读全文
posted @ 2017-03-28 21:18 时间带我去旅行 阅读(269) 评论(0) 推荐(0)