官方下载Spring 3.x 最新开发版本
http://www.springsource.org/spring-community-download
最新版本是3.2.2
Spring依赖包:
spring-framework-3.0.2.RELEASE-dependencies.zip
* 从spring3.0.2之后,不再提供 dependencies 开发包 (存放很多Spring 依赖开源项目的jar包 )
Spring核心包:
spring-framework-3.2.0.RELEASE-dist.zip
解压spring3.2 分析目录结构 (不同版本Spring 目录结构 有区别)
docs 文档
libs 开发jar包
schema 开发Spring时,使用的 配置文件 和需要引入的 约束文件
*spring环境搭建:
导入最简单的jar包,来自Spring核心模块
spring-framework-3.2.0.RELEASE-dist.zip中的:
spring-beans-3.2.0.RELEASE.jar
spring-context-3.2.0.RELEASE.jar
spring-core-3.2.0.RELEASE.jar
spring-expression-3.2.0.RELEASE.jar
还需要:依赖 commons-logging (通用日志工具,提供日志实现类,支持配置文件 )
spring-framework-3.0.2.RELEASE-dependencies.zip 中的:
com.springsource.org.apache.commons.logging-1.1.1.jar
* 使用commons-logging 时,程序会首先搜索lib下是否提供了log4j的jar ,
如果提供了,就会使用提供的log4j ,没有再使用commons-logging自带的log4j
(commons-logging这个技术,本身就是log4j整合好的,都是apache的 )
导入log4j
log4j.jar
在src 创建log4j.properties
至此,spring的环境搭建完成。