开始学习spring-framework。

准备工作:

1.将 framework源码 地址:https://github.com/spring-projects/spring-framework。 Fork到自己的github中,地址:https://github.com/chijiaoluohan/spring-framework

2.下载GitHubDesktop可视化工具,将项目clone到本地。

3.因为源码是基于gradle的,所以下载并且安装gradle。

4.源码目录中,有用Markdown语法写的说明。如图:

spring-framework源码中文注释解析(一)idea导入源码

其中的内容:

1. Precompile `spring-oxm` with `./gradlew :spring-oxm:compileTestJava`
2. Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
3. When prompted exclude the `spring-aspects` module (or after the import via File-> Project Structure -> Modules)
4. Code away
5.我们不管上面说什么,看文件中还有一个gradlew.bat。我们姑且双击了试试。双击后如图:

spring-framework源码中文注释解析(一)idea导入源码

6.上面的窗口莫名其妙消失了。所以去spring-framework目录下直接执行gradlew.bat。

出现下面的内容

spring-framework源码中文注释解析(一)idea导入源码

这样应该算成功了,因为提示build successful了。

7.下面导入idea.选择import project

然后选择

spring-framework源码中文注释解析(一)idea导入源码

8.勾选Use auto-import和Create directories for empty content root automatically,并且选择Gradle home和Gradle JVM

9.导入成功,自动开始build,稍等片刻,如下目录结构,则说明成功

spring-framework源码中文注释解析(一)idea导入源码

相关文章:

  • 2021-11-14
  • 2021-08-30
  • 2021-12-12
  • 2022-02-02
猜你喜欢
  • 2022-12-23
  • 2021-12-19
  • 2021-08-13
  • 2021-04-11
  • 2021-11-23
  • 2021-07-16
  • 2021-06-30
相关资源
相似解决方案