How to read open source code (spring-framework,jfinal two projects for example)

Source: Internet
Author: User
Tags git clone

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.