1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】

step 1

make sure you have install the JDK ,eclipse ,GIT

you can find the new revision Spring project in https://github.com/SpringSource/spring-framework

step 2

clone the project from the server by  HTTP or SSH or any way that you like.

example

image

 

step 3

build and import spring project to eclipse workstation

before you start.you had better use git to create a  new branch for your own work branch

 1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】_第1张图片

then run command import-into-eclipse

image

build it step by step  flow the remind

1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】_第2张图片

if you haven't install the gradle. the program will auto to download and install it.

after download all the jar . the pogrom will build the project. if you find any error on you build  process,try to make sure you java_home and JDK revision and so on.

example,when I build the project  I find a  error:

 

D:\springCode\springFramework\spring-framework\spring-core\src\main\java\org\springframework\util\xml\StaxUtils.java:318
: cannot find symbol
symbol  : method newFactory()
location: class javax.xml.stream.XMLEventFactory
                return new XMLEventStreamWriter(eventWriter, XMLEventFactory.newFactory());

1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】_第3张图片

the reason is the method newFactory() was added in JDK6 version 1.6.0.18.   but my JDK revision is 1.60.16

After I change JDK to revision 1.7. continue

about 1 hour later. the build have be successful

Use eclipse import  Existing Projects into Workspace  and select spring project , then  you will get it

1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】_第4张图片

1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】_第5张图片

if you find also have some errors like me. the most impossible reason it is by JDK revision of eclipse. change it  more than JDK 1.6018

1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】_第6张图片

1. Introduce how to import the Spring Framework sourcecode into an eclipse project 【analyze spring framework source 】_第7张图片

 

 

 

ok, welcome to spring word now.

if you have any question about this theme. you can send email to me .my email  is [email protected]

I will keep update about the theme of analyze spring framework source

 

 

文章原创,用英文写只是为了提高下英语水平。

analyze spring framework source 系列会保持更新,欢迎关注

你可能感兴趣的:(framework)