Spring框架学习-搭建第一个Spring项目
步骤一:下载Spring开发包。 官网: https://spring.io/ 下载地址: https://repo.spring.io/libs-release-local/org/springframework/spring/ spring-framework-3.0.2.RELEASE-dependencies和spring-framework-4.2.4.RELEASE-dist 解压第二个,解压目录: 步骤二:搭建项目,引入Spring项目 创建项目:由于Spring是JavaSE/EE一站式框架,所以既可以创建web项目或者java项目,这里创建web项目。 导入jar:Spring框架搭建肯定需要核心包,上面Core Container里面四个就是核心,其他的,需要什么功能添加哪个jar,在libs里面找。还有spring已经弄好的日志记录包,在dependencies里面log4j和commons包下 步骤三:引入相关配置文件(在src下创建) log4j.properties ### direct log messages to stdout ### log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target=System