源码中有个文件 import-into-idea.md 。按照里面的步骤操作即可:
- 源码目录中执行 ./gradlew :spring-oxm:compileTestJava。前提是需要安装 gradle。
- 导入idea
Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle) - 编译执行 ./gradlew build
编译、测试、构建、分布
To compile, test, build all jars, distribution zips, and docs - ./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:
网友评论