java源码导入eclipse_spring framework源码下载并导入eclipse

一. 准备工作

1.下载安装sts(springsource推荐使用), 毕竟人家的框架用他自家的ide是最好的,当然sts也是基本eclipse的, 下载地址: http://www.springsource.org/downloads/sts-ggts

2.下载安装gradle, spring 源码构建加入了gradle支持. gradle下载: http://www.gradle.org/downloads ,下载后设置环境变量: GRADLE_HOME = gradle主目录 , 并在path中加入;%GRADLE_HOME%\bin;

3.下载安装github, spring源码托管到了github : http://windows.github.com/ (windows) ,当然您压需要注册github账号 , spring github托管地址: https://github.com/SpringSource/spring-framework

二.将springframework导入eclipse(sts)

1.生成eclipse配置 .

进入spring源码目录: 结构如下:

092cd62882ed0ccc9eed451066b55964.png

9f8ae7acb5b001a61305e9b17099b58f.png

可以看到spring为我们提供了导入eclipse的脚本,执行脚本即可.

不过经过我的实验spring提供的脚本执行到一半就出问题了不知道是什么原因. 我们自己用gradle命令来替代它提供给我们的脚本:

进入spring目录, 执行命令: gradle eclipse -x :eclipse

第一次执行会花比较长的时间,gradle会去下载许多依赖库, 执行报的结果如下 , 因为我之前已经执行过了花的时间不多

F:\GitHub\spring-framework>gradle eclipse -x :eclipse

:buildSrc:clean

:buildSrc:compileJava UP-TO-DATE

:buildSrc:compileGroovy

:buildSrc:processResources

:buildSrc:classes

:buildSrc:jar

:buildSrc:assemble

:buildSrc:compileTestJava UP-TO-DATE

:buildSrc:compileTestGroovy UP-TO-DATE

:buildSrc:processTestResources UP-TO-DATE

:buildSrc:testClasses UP-TO-DATE

:buildSrc:test

:buildSrc:check

:buildSrc:build

The ConfigurationContainer.add() method has been deprecated and is scheduled to be removed

in Gradle 2.0. Please use the create() method instead.

The groovy configuration has been deprecated and is scheduled to be removed in Gradle 2.0.

Typically, usages of 'groovy' can simply be replaced with 'compile'. In some cases, it ma

y be necessary to additionally configure the 'groovyClasspath' property of GroovyCompile a

nd Groovydoc tasks.

The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradl

e 2.0. Please use the create() method instead.

:spring-aop:eclipseClasspath

:spring-aop:eclipseJdtPrepare

:spring-aop:eclipseJdt

:spring-aop:eclipseProject

:spring-aop:eclipseSettings

:spring-aop:eclipseWstComponent

:spring-aop:eclipse

:spring-aspects:eclipseClasspath

:spring-aspects:eclipseJdtPrepare

:spring-aspects:eclipseJdt

:spring-aspects:eclipseProject

:spring-aspects:eclipseSettings

:spring-aspects:eclipseWstComponent

:spring-aspects:eclipse

:spring-beans:eclipseClasspath

:spring-beans:eclipseJdtPrepare

:spring-beans:eclipseJdt

:spring-beans:eclipseProject

:spring-beans:eclipseSettings

:spring-beans:eclipseWstComponent

:spring-beans:eclipse

:spring-build-src:eclipseClasspath

:spring-build-src:eclipseJdtPrepare

:spring-build-src:eclipseJdt

:spring-build-src:eclipseProject

:spring-build-src:eclipseSettings

:spring-build-src:eclipseWstComponent

:spring-build-src:eclipse

:spring-context:eclipseClasspath

:spring-context:eclipseJdtPrepare

:spring-context:eclipseJdt

:spring-context:eclipseProject

:spring-context:eclipseSettings

:spring-context:eclipseWstComponent

:spring-context:eclipse

:spring-context-support:eclipseClasspath

Download http://repo.springsource.org/libs-release/commons-logging/commons-logging/1.1.3/c

ommons-logging-1.1.3.pom

Download http://repo.springsource.org/libs-release/commons-logging/commons-logging/1.1.3/c

ommons-logging-1.1.3.jar

:spring-context-support:eclipseJdtPrepare

:spring-context-support:eclipseJdt

:spring-context-support:eclipseProject

:spring-context-support:eclipseSettings

:spring-context-support:eclipseWstComponent

:spring-context-support:eclipse

:spring-core:eclipseClasspath

:spring-core:eclipseJdtPrepare

:spring-core:eclipseJdt

:spring-core:eclipseProject

:spring-core:eclipseSettings

:spring-core:eclipseWstComponent

:spring-core:eclipse

:spring-expression:eclipseClasspath

:spring-expression:eclipseJdtPrepare

:spring-expression:eclipseJdt

:spring-expression:eclipseProject

:spring-expression:eclipseSettings

:spring-expression:eclipseWstComponent

:spring-expression:eclipse

:spring-instrument:eclipseClasspath

:spring-instrument:eclipseJdtPrepare

:spring-instrument:eclipseJdt

:spring-instrument:eclipseProject

:spring-instrument:eclipseSettings

:spring-instrument:eclipseWstComponent

:spring-instrument:eclipse

:spring-instrument-tomcat:eclipseClasspath

:spring-instrument-tomcat:eclipseJdtPrepare

:spring-instrument-tomcat:eclipseJdt

:spring-instrument-tomcat:eclipseProject

:spring-instrument-tomcat:eclipseSettings

:spring-instrument-tomcat:eclipseWstComponent

:spring-instrument-tomcat:eclipse

:spring-jdbc:eclipseClasspath

:spring-jdbc:eclipseJdtPrepare

:spring-jdbc:eclipseJdt

:spring-jdbc:eclipseProject

:spring-jdbc:eclipseSettings

:spring-jdbc:eclipseWstComponent

:spring-jdbc:eclipse

:spring-jms:eclipseClasspath

:spring-jms:eclipseJdtPrepare

:spring-jms:eclipseJdt

:spring-jms:eclipseProject

:spring-jms:eclipseSettings

:spring-jms:eclipseWstComponent

:spring-jms:eclipse

:spring-orm:eclipseClasspath

:spring-orm:eclipseJdtPrepare

:spring-orm:eclipseJdt

:spring-orm:eclipseProject

:spring-orm:eclipseSettings

:spring-orm:eclipseWstComponent

:spring-orm:eclipse

:spring-orm-hibernate4:eclipseClasspath

:spring-orm-hibernate4:eclipseJdtPrepare

:spring-orm-hibernate4:eclipseJdt

:spring-orm-hibernate4:eclipseProject

:spring-orm-hibernate4:eclipseSettings

:spring-orm-hibernate4:eclipseWstComponent

:spring-orm-hibernate4:eclipse

:spring-oxm:eclipseClasspath

:spring-oxm:eclipseJdtPrepare

:spring-oxm:eclipseJdt

:spring-oxm:eclipseProject

:spring-oxm:eclipseSettings

:spring-oxm:eclipseWstComponent

:spring-oxm:eclipse

:spring-struts:eclipseClasspath

:spring-struts:eclipseJdtPrepare

:spring-struts:eclipseJdt

:spring-struts:eclipseProject

:spring-struts:eclipseSettings

:spring-struts:eclipseWstComponent

:spring-struts:eclipse

:spring-test:eclipseClasspath

:spring-test:eclipseJdtPrepare

:spring-test:eclipseJdt

:spring-test:eclipseProject

:spring-test:eclipseSettings

:spring-test:eclipseWstComponent

:spring-test:eclipse

:spring-test-mvc:eclipseClasspath

:spring-test-mvc:eclipseJdtPrepare

:spring-test-mvc:eclipseJdt

:spring-test-mvc:eclipseProject

:spring-test-mvc:eclipseSettings

:spring-test-mvc:eclipseWstComponent

:spring-test-mvc:eclipse

:spring-tx:eclipseClasspath

:spring-tx:eclipseJdtPrepare

:spring-tx:eclipseJdt

:spring-tx:eclipseProject

:spring-tx:eclipseSettings

:spring-tx:eclipseWstComponent

:spring-tx:eclipse

:spring-web:eclipseClasspath

:spring-web:eclipseJdtPrepare

:spring-web:eclipseJdt

:spring-web:eclipseProject

:spring-web:eclipseSettings

:spring-web:eclipseWstComponent

:spring-web:eclipse

:spring-webmvc:eclipseClasspath

:spring-webmvc:eclipseJdtPrepare

:spring-webmvc:eclipseJdt

:spring-webmvc:eclipseProject

:spring-webmvc:eclipseSettings

:spring-webmvc:eclipseWstComponent

:spring-webmvc:eclipse

:spring-webmvc-portlet:eclipseClasspath

:spring-webmvc-portlet:eclipseJdtPrepare

:spring-webmvc-portlet:eclipseJdt

:spring-webmvc-portlet:eclipseProject

:spring-webmvc-portlet:eclipseSettings

:spring-webmvc-portlet:eclipseWstComponent

:spring-webmvc-portlet:eclipse

:spring-webmvc-tiles3:eclipseClasspath

:spring-webmvc-tiles3:eclipseJdtPrepare

:spring-webmvc-tiles3:eclipseJdt

:spring-webmvc-tiles3:eclipseProject

:spring-webmvc-tiles3:eclipseSettings

:spring-webmvc-tiles3:eclipseWstComponent

:spring-webmvc-tiles3:eclipse

BUILD SUCCESSFUL

Total time: 1 mins 57.462 secs

执行完毕的进入到每个子目录下可以看到多了几个文件或目录, 就是设置eclipse项目及classpath的一配置如下:

11b7813ed2d8e8b6df0eb49e1a872c3a.png .settingsh文件夹及.classpath和.project就是刚才生成的配置

2.导入eclipse

eclipse : import - >

e71f5ba3c32dec467aa7d8dae5aa68e6.png

4ba7bdf03d4920be8b07675c5125189d.png

搞定收工

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/411008.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

BI Publisher开发基本流程

1 配置文件位置 OracleBI/xmlp/XMLP/Admin/Configuration 2 登录到BI Publisher Enterprise (以下简称BIP) http://hostname:9704/xmlpserver/ 3 配置数据源 BIP支持四种类型的数据源连接 a) JDBC b) JNDI c) OLAP (多维服务器,如Essbase Hyperion&#…

用户账号系统(python)

user_list[]#所有学生账号储存在该列表中 for i in range(1,201):temp{name:stustr(i),password:ppsucstr(i),email:stustr(i)gd.com}user_list.append(temp) #通过for循环创建200个现有学生账号 print("欢迎使用公大教务系统!"…

查询优化(1)

--最近在看Inside Microsoft SQL Server 2005:Query Tuning and Optimization一书。其中有一段内容感觉归纳得不错,纠正了我以前的一些错误概念。 对查询我们可以从以下几个方面来考虑进行优化。 重写查询语句 除了尽量避免太复杂的谓词判断,我们还需要尽…

java二分法查找法算法_算法二:二分法查找(java语言)

说明:二分法查找* 解析:* 一维数组,二分法查找:假如有一组数为1,2,3,4,5,6,7,8,9,10要查给定的值7.* 可设三个变量low,mid,high分别指向数据的前,中间和后,mid(lowhigh)/2.* 注意&am…

四十大经(八正道)

中部117、四十大经 我听到这样: 有一次,世尊住在舍卫城祇树给孤独园。 在那里,世尊召唤比丘们:“比丘们!” “尊师!”那些比丘回答世尊。 世尊这么说: “我将教导你们圣正定的助伴、资粮&…

[原创]在windows下搭建基于apache的SVN环境

[原创]在windows下搭建基于apache的SVN环境 1 软件下载: 在http://httpd.apache.org/download.cgi,下载: apache_2.2.14-win32-x86-openssl-0.9.8k.msi 在 http://subversion.tigris.org/,下载: Setup-Subversion-1.6.…

java 线程不足_Java 线程基础知识

wait() 和notify()、notifyAll()这三个方法用于协调多个线程对共享数据的存取,所以必须在 Synchronized 语句块内使用这三个方法,否则会抛出错 IllegalMonitorStateException。前面说过 Synchronized 这个关键字用于保护共享数据,阻止其他线程…

16.Python略有小成(内置模块Ⅱ)

Python(内置模块Ⅱ) 一、规范化开发 一个py文件中 文件加载问题代码可读性,查询差要将一个py文件分开,合理的分成多个py文件 配置文件放在一起 : 一些轻易不改变的变量,一般命名 settings.py主逻辑函数放在一起 : 一般命名 src.py辅助功能函数放在一起 : 公共组件部分,装饰器,l…

java8 入门脚本之家_Java 8中的Lambda表达式

我想使用lambda表达式而不是for循环生成数字列表.所以让我们想要生成一个100以下的所有三角形数字的列表.三角数字是以下公式的数字:(n * n n)/ 2这样做最好的方法是什么?目前我有这个:Stream.iterate(1,n -> n 1).limit(100).map(n ->…

[原]nasm语法

工具:nasm 汇编gcc 编译cld 进行链接kscope 查看源代码make 工程管理khexedit 分析二进制文件一:nasm源文件布局:像其他汇编器一样, nasm源文件包含四个域的组合。(除了宏, 或者预编译器指示, 或者汇编…

matlab的算法java_matlab环境下的回归算法分析

嗨,我想对回归技术进行全面分析,因此将继续编辑这个问题 . 我正在尝试使用Matlab中提供的技术来解决回归问题 . 理想情况下,我想看看诸如此类的技巧线性回归Logistic回归贝叶斯回归支持向量回归回归的高斯过程问题陈述给定数据 X 和 Y &#…

C#仿QQ皮肤-常用用户控件EnterFrom1和窗体EntryForm的实现

导读部分 ------------------------------------------------------------------------------------------------------------- C#仿QQ皮肤-实现原理系列文章导航 最新版源码下载 http://www.cckan.net/thread-2-1-1.html 本次是我们窗体实现的最后一节&#xff0c…

idea中删除java类并提交_IDEA 删除java类的3种提示

1. 点击 delete 删除文件时,会弹出如下选项:Safe delete (with usage search)Search in comments and strings“Safe delete ( with usage search)”, 字面意思是使用搜索安全删除. 是否选中结果分别为:没有选中状态,直接删除.选中状态,删除前IDEA会搜寻…

S3C2440、S3C2450和S3C6410之间区别

S3C2440:  主频400MHz;  SDRam内存控制器;  支持Nor Flash和Nand Flash(SLC)  支持2种Flash启动;  内部LCD、I2C、Camera等控制器。 S3C2450:  主频533MHz;  双总线架…