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

 image

then run command import-into-eclipse

image

build it step by step  flow the remind

image

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());

image

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

image

image

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

image

image

ok, welcome to spring word now.

if you have any question about this theme. you can send email to me .my email  is qing878@gmail.com

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

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

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

原文地址:https://www.cnblogs.com/springsource/p/2818575.html