Do not know other people like me, after working for a while to find an open source project to read the code, but most of the time again feel that the start, and recently sorted out, set up spring source reading environment is indeed troublesome. First of all, my environment: operating system: MAC, Development Ide:idea
Preparation: GitHub account, local installation of good GIT,MAVEN,JDK8
The first is jfinal simpler:
Steps:
1 Download the source code on the GitHub
Https://github.com/jfinal/jfinal
2 Download Demo
3 will source code and demo are imported idea, the demo jfinal jar removed, depending on the Jfinal module can be.
Spring's environment builds:
Steps:
1 git clone https://github.com/spring-projects/spring-framework after import idea
GitHub Document: # # Steps
Within your locally cloned spring-framework working directory:pre-compile with. SPRING-OXM/gradlew : Compiletestjava Import into Idea (File->import Project->import from external Model->gradle) Set the project JDK As appropriate (1.8+) Exclude the Spring-aspects module (go to File->project structure->modules) Code away
In particular, first compile SPRING-OXM, use JDK8, remove aspects module
2 Create a Spring-demo project that relies on the required source module
Using spring Struts2,hibernate to build the demo project, I did the demo address: Https://github.com/shenyb/ssh-demo.git
Problem:
1 when the module relies on the spring module, the dependencies in the Pom in the demo can not be removed or the error is started.
2 JDK8 in idea set after always prompted to find the problem, the JDK8 set to default, in the re-poured
3 Import eclipse will not show the source package, no success
4 IDEA15 will have problems, use IDEA14 is no problem.
5 Use MVN Tomcat7:run, first success, later error aused by:org.apache.catalina.lifecycleexception:a child container failed start
At Org.apache.catalina.core.ContainerBase.startInternal (containerbase.java:1131)
At Org.apache.catalina.core.StandardHost.startInternal (standardhost.java:800)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150)
... 6 more
The reason has not yet been found, but it is fine to put it on local tomcat operation.
6 do not rely on Web-porlet module, or error
Note: When setting up the spring source reading environment, be sure to look at the official documentation carefully.