如何把SpringFramework 322源码导入Eclipse.pdf
上传人:qw****27 上传时间:2024-09-12 格式:PDF 页数:3 大小:141KB 金币:15 举报 版权申诉
预览加载中,请您耐心等待几秒...

如何把SpringFramework 322源码导入Eclipse.pdf

如何把SpringFramework322源码导入Eclipse.pdf

预览

在线预览结束,喜欢就下载吧,查找使用更方便

15 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

如何把SpringFramework3.2.2源码导入Eclipse从https://github.com/SpringSource/spring-framework下载合适的版本。比如:点击,得到spring-framework-3.2.2.RELEASE.zip。解压缩zip文件,得到文件夹spring-framework-3.2.2.RELEASE。在spring-framework-3.2.2.RELEASE中,双击import-into-eclipse.bat,遇到需要确认的地方,都键入回车。然后Gradle就开始工作:下载需要jar文件,创建Eclipse项目的相关文件。速度很慢怎么办?初次执行import-into-eclipse.bat,速度会很慢,可能是因为国内网络环境不好。如果觉得进度过慢,可以关闭Dos窗口,再双击import-into-eclipse.bat,重新执行。上次执行的内容不会被清除,Gradle会很快继续执行下去。反复重新执行import-into-eclipse.bat后,最后能把SpringFramework大多数项目导入Eclipse。要有耐心,可能需要经过几天时间,才能让import-into-eclipse.bat执行完毕。当import-into-eclipse.bat执行完毕时,它自己会关闭窗口。小修正当import-into-eclipse.bat执行完毕后,基本上,每个项目文件夹下,可能会出现.settings文件夹,.classpath,.project等文件。现在你就可以把各项目导入Eclipse了。File>Import>ExistingProjectsintoWorkspace,告诉Eclipse导入你的spring-framework-3.2.2.RELEASE文件夹就可以了。但是有一个例外:spring-webmvc-tiles3文件夹。这个文件夹下面只有src,没有其他文件。所以需要修一下。修复过程如下:手动添加.classpath,.project文件修改.project文件可以从邻近文件夹里复制,再修改.project的name和comment:<name>spring-webmvc-tiles3</name><comment>SpringWebMVCtiles3</comment>修改.classpath文件2013/5/410:00第3—1页关键是提供正确的jar文件。可以在Eclipse里,清理掉这个项目的jar文件,再逐个导入正确的jar文件。修改的.classpath文件,可能如下面所示:<?xmlversion="1.0"encoding="UTF-8"?><classpath><classpathentrykind="src"path="src/main/java"/><classpathentrykind="src"path="src/test/java"/><classpathentrykind="src"path="src/test/resources"/><classpathentryexported="true"kind="con"path="org.eclipse.jdt.launching.JRE_CONTAINER"/><classpathentryexported="true"kind="src"path="/spring-core"/><classpathentryexported="true"kind="src"path="/spring-beans"/><classpathentryexported="true"kind="src"path="/spring-context"/><classpathentryexported="true"kind="src"path="/spring-web"/><classpathentryexported="true"kind="src"path="/spring-webmvc"/><classpathentryexported="true"kind="src"path="/spring-aop"/><classpathentryexported="true"kind="src"path="/spring-expression"/><classpathentryexported="true"kind="src"path="/spring-instrument"/><classpathentryexported="true"kind="src"path="/spring-oxm"