如何在Idea中编译构建Spring Framework 5.x

  1. 安装配置Gradle(略)

  2. 下载源码:git clone https://github.com/spring-projects/spring-framework.git

  3. 按照工程下import-into-idea.md文件的提示进行操作

    The following has been tested against IntelliJ IDEA 2016.2.2
    
    ## Steps
    
    _Within your locally cloned spring-framework working directory:_
    
    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 ## Known issues 1. `spring-core` and `spring-oxm` should be pre-compiled due to repackaged dependencies.
    See `*RepackJar` tasks in the build and https://youtrack.jetbrains.com/issue/IDEA-160605).
    2. `spring-aspects` does not compile due to references to aspect types unknown to
    IntelliJ IDEA. See https://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the
    'spring-aspects' can be excluded from the project to avoid compilation errors.
    3. While JUnit tests pass from the command line with Gradle, some may fail when run from
    IntelliJ IDEA. Resolving this is a work in progress. If attempting to run all JUnit tests from within
    IntelliJ IDEA, you will likely need to set the following VM options to avoid out of memory errors:
    -XX:MaxPermSize=2048m -Xmx2048m -XX:MaxHeapSize=2048m
    4. If you invoke "Rebuild Project" in the IDE, you'll have to generate some test
    resources of the `spring-oxm` module again (`./gradlew :spring-oxm:compileTestJava`) ## Tips In any case, please do not check in your own generated .iml, .ipr, or .iws files.
    You'll notice these files are already intentionally in .gitignore. The same policy goes for eclipse metadata. ## FAQ Q. What about IntelliJ IDEA's own [Gradle support](https://confluence.jetbrains.net/display/IDEADEV/Gradle+integration)? A. Keep an eye on https://youtrack.jetbrains.com/issue/IDEA-53476
    • 按照stepsKnown issues指示进行操作即可,第一次构建可能要下载大量依赖,可能需要花费一些时间,慢的可能需要一到俩小时,需要耐心等待。

    • 编译完spring-corespring-oxm之后,再去编译spring-context时候,你会发现报错了,有来自.gradle文件的报错,有因为xxx类找不到的报错,这里报出的任何错误,一律通过注释对应的代码进行解决。

      .gradle文件报错,将对应报错行的构建代码注释掉,xxx类找不到,将对xxx类的引用注释掉

    • 新增module进行测试

    Note: 由于spring-aspects的实现依赖了aspectj,需要另外引入,所以不调试spring-aspects模块内容的同学,可以直接把这个模块给移除掉。

我这边构建一份最新的工程(2019-11-2 2:26)放在Github上供大家参考

如何在Idea中编译构建Spring Framework 5.x的更多相关文章

  1. 如何在Windows中编译Linux Unix的代码(采用cygwin)?

    来源:http://www.cnblogs.com/rocky_yi/archive/2009/12/08/cygwin.html   作者:rocky_y 很多经典算法往往是用C++在linux下实 ...

  2. 如何在SAS中重新构建限价指令簿(Limit Order Book):使用HashTable

    在之前的一篇日志里(http://blog.csdn.net/u010501526/article/details/8875446),我将重新构建LOB(Limit Order Book)分为了三步 ...

  3. 如何在vs2015中编译并配置tesseract4.0

    1)安装相关软件: 下载ccpan,把路径放到path(右击电脑,选择“属性”,选择左边的“高级系统设置”,选择“环境变量”,找到“系统变量”里面的“path”,点击“编辑”,选择右边的“新建”,输入 ...

  4. visual c++.net 技术内幕 第6版 附带的程序如何在vs2013中编译成功

    看vc++技术内幕时 如果你使用的是比此书的附带项目更新版的vs时千万不要使用这种方法,这些对编译都有影响. 请使用当前新版的vs并输入书中改动的代码就Ok,因为vs会生成合理的mfc代码,养成好的习 ...

  5. 如何在container中编译dotnet的eShopOnContainers

    准备的软件   问题 Image下载问题 以下就是为啥要有最后一个软件(我是使用版): SQLSever for Linux 内存需求 需要编译Image   成功搞定 参考 Welcome to t ...

  6. 记录5-如何在UltraEdit中编译和运行Java

    1点击“高级”,再点击“工具配置” 2点击“插入”,在“菜单项”名称上输入“编译java程序”,在“命令行”里输入“javac %n%e”,在工作目录上填“%p”. 3切换到“输出”项,选择“输出到列 ...

  7. step6----->往工程中添加spring boot项目------->修改pom.xml使得我的project是基于spring boot的,而非直接基于spring framework

    文章内容概述: spring项目组其实有多个projects,如spring IO platform用于管理external dependencies的版本,通过定义BOM(bill of mater ...

  8. Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->使用Spring Framework开发自己的应用程序

    1.直接基于spring framework开发自己的应用程序: 1.1参考资料: Spring官网spring-framework.4.3.5.RELAESE的Reference Documenta ...

  9. Spring Framework 5.0.0.M3中文文档 翻译记录 Part I. Spring框架概览1-2.2

    Part I. Spring框架概览 The Spring Framework is a lightweight solution and a potential one-stop-shop for ...

随机推荐

  1. 高通电源管理qpnp-vm-bms驱动

    1. compatible节点: qpnp-vm-bms.c使用来控制电池曲线的和BMS功能的,其compatible节点是"qcom,qpnp-vm-bms" 2. probe函 ...

  2. 蓝桥杯 algo122 未名湖的烦恼 简单题

    #include <iostream> using namespace std; int m, n, ans; void solve(int m, int n, int cnt) { &a ...

  3. 基于Linux系统--web环境搭建

    上线部署文档 数据库部分1.下载Mysql服务    #yum  install  mysql-server 2.更改             /etc/my.cnf 3.启动Mysql        ...

  4. 基于Docker搭建大数据集群(七)Hbase部署

    基于Docker搭建大数据集群(七)Hbase搭建 一.安装包准备 Hbase官网下载 微云下载 | 在 tar 目录下 二.版本兼容 三.角色分配 节点 Master Regionserver cl ...

  5. android实现emoji输入

    学android也有一段时间, 一直都是自己摸索, 各种上网查资料, 也明白了不能一味去索取有时间也要分享一些自己的心得 . 最近几天都在写关于android emoji输入的小例子,网上有不少源码还 ...

  6. SpringBootSecurity学习(13)前后端分离版之JWT

    JWT 使用 前面简单介绍了把默认的页面登录改为前后端分离的接口异步登录的方法,可以帮我们实现基本的前后端分离登录功能.但是这种基本的登录和前面的页面登录还有一个一样的地方,就是使用session和c ...

  7. C语言I—2019秋作业02

    1.[新增内容] 这个作业属于那个课程 C语言程序设计 这个作业要求在哪里 <C语言I-2019秋作业02> 我在这个课程的目标是 这个作业在那个具体方面帮助我实现目标 <实现一些基 ...

  8. 安装/删除MySQL数据库

    MySQL的数据存储目录为data,data目录通常在C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5 ...

  9. Basic Example using SMTP (for PHPMailer v5.0.0 and up)

    sample as below: require_once('../class.phpmailer.php'); //include("class.smtp.php"); // o ...

  10. 关于CSS的书写规范和顺序

    关于CSS的书写规范和顺序,是大部分前端er都必须要攻克的一门关卡,如果没有按照良好的CSS书写规范来写CSS代码,会影响代码的阅读体验.这里总结了一个CSS书写规范.CSS书写顺序供大家参考,这些是 ...