导入idea并编译spring源码

2018-08-17  本文已影响0人  50e383299c68

源码中有个文件 import-into-idea.md 。按照里面的步骤操作即可:

  1. 源码目录中执行 ./gradlew :spring-oxm:compileTestJava。前提是需要安装 gradle。
  2. 导入idea
    Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
  3. 编译执行 ./gradlew build
    编译、测试、构建、分布
    To compile, test, build all jars, distribution zips, and docs
  4. ./gradlew -a :spring-webmvc:test 命令可以只编译spring-webmvc。
    Gradle有很好的增量构建支持,所以运行时不需要执行clean命令,这样就可以保持快速运行。您还可以使用“-a”标志和“:project”前缀来避免评估和构建其他模块。例如,如果迭代Spring-webmvc中的更改,则运行以下代码只对该模块进行评估和构建 ./gradlew -a :spring-webmvc:test
    Gradle has good incremental build support so run without clean to keep things snappy. You can also use the "-a" flag and the ":project" prefix to avoid evaluating and building other modules. For example, if iterating over changes in spring-webmvc, run with the following to evaluate and build only that module:
上一篇下一篇

猜你喜欢

热点阅读