Eclipse: view the Spring source code and eclipsespring source code.
Digress
For Spring frameworks, the point-to-point method is usually used. I have always wanted to study it in depth. I just recently saw Spring source code deep analysis, so I want to study it with my book.
If Maven is used
If Maven is used and debugging is required, you can directly use Eclipse to download the source code !!
For example, I want to see the Attribute. java file under spring-core.
Open directly and you will be prompted that the source file cannot be found. Right-click the Maven dependency package,
Compile Spring source code
If you want to view and modify the source code of Spring, you need to re-import the Spring Project and compile it!
If you download the Spring source code and import it to Eclipse, there are a lot of online searches, and the results are similar. I followed the above method to execute the import-into-eclipse.bat file under the root directory and found that the first step reported an error:
Error occurred during initialization of VMCould not reserve enough space for object heapError: Could not create the Java Virtual Machine.
Probably it is to set JVM parameters, continue Baidu...
set DEFAULT_JVM_OPTS=-Xms512m -Xmx512m -XX:MaxPermSize=256m
The same error is reported!
Finally, I found a lot of information and found a different solution: Explain
set JAVA_HOME=D:\Softs\JDKset GRADLE_OPTS=-Dgradle.user.home=D:\Softs\gradle-2.2.1set DEFAULT_JVM_OPTS=
Then, switch to the source code root directory in cmd, execute the import-into-eclipse.bat, and find that the execution is down .....
Placeholder
The problem arises again. compilation errors and many dependent files cannot be found. It may be because of the network environment that can be executed several times. So, re-execute the import-into-eclipse.bat and finally download... However, the speed is not generally slow. Take it easy !!!