![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
chenguanwei
这个作者很懒,什么都没留下…
展开
-
手动实现IOC容器
IOC(Inversion of Control),即控制反转,它使你不需要再自己来实现对象的创建,而是把这些工作都交由容器来进行管理,增加了代码的可重用性。下面,便手动实现一个简单的IOC容器。首先建立一个接口和这个接口的2个实现类: package cn.cgw.ioc;public interface ReportGenerator { public void generate...原创 2009-04-04 19:10:16 · 197 阅读 · 0 评论 -
Modularizing Crosscutting Concerns with Classic
AOP defines a group of high-level concepts for application developers to express their crosscutting concerns. First, the crosscutting action to take at a particular execution point is encapsulated i...原创 2009-04-07 23:21:54 · 119 阅读 · 0 评论 -
Matching Methods with Classic Spring Pointcuts
Pointcut is another core AOP concept, usually appearing as an expression, and allowing you to match certain program execution points to apply an advice. In classic Spring AOP, pointcuts are also dec...原创 2009-04-08 13:20:48 · 88 阅读 · 0 评论 -
MySql数据源的配置
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property nam原创 2009-04-12 14:18:01 · 136 阅读 · 0 评论 -
bean的创建
Bean的创建1、通过构造函数创建bean:<bean id="" class=""/>2、通过静态工厂方法创建bean(需要指定工厂方法的名称):<bean id="" class="" factory-method=""/>3、通过实例工厂方法创建bean:注:调用一个已存在原创 2009-07-23 09:18:24 · 103 阅读 · 0 评论