spring源码导入eclipse全过程

    xiaoxiao2021-12-12  7

    具体步骤:

    ①spring源码下载

    说明:从github上下载的是3.2 大版本的可能会要求JDK的版本1.8,我电脑上的JDK版本是1.7

    ②gradle下载

    说明:我的版本是3.1,下载后要配置环境变量

    ③编译

    进入源码目录执行:gradle eclipse -x :eclipse (耗时较长)

    我中途遇到了这样一个问题:

    * What went wrong: A problem occurred configuring project ':spring-orm-hibernate4'. > Cannot change dependencies of configuration ':spring-orm-hibernate4:runtimeMer ge' after it has been resolved. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    解决方案:

    1、找到对应的build.gradle文件,我的是D:\Java\github\spring-framework-3.2.x\build.gradle 2、找到文件中的project("spring-orm-hibernate4") ,将“merge.into”那行注释掉 再次运行gradle命令,若出现类似问题,继续注释掉“merge.into

    在build spring-core项目的后,发现少了两个包: 1.spring-cglib-3.2.5 2.spring-objenesis-2.5.1 从maven中央仓库下载导入即可。

    另外需要注意:工程之间的相互引用。

    参考文章:http://bbs.csdn.net/topics/391907758

    转载请注明原文地址: https://ju.6miu.com/read-900315.html

    最新回复(0)