spring相关知识点易错

1.spring不支持静态变量注入,即不能再static变量上面加@Resoure

要是想注入的话就用set方法注入

private static ComboPooledDataSource pool ;
@Resource(name="pool")
public void setPool(ComboPooledDataSource pool) {
	this.pool = pool;
}

 

 

      

posted @ 2018-05-06 16:57  吴小凯  阅读(161)  评论(0编辑  收藏