1、Spring的整体架构。

Core Container: Core(核心)Beans(访问配置文件,管理Beans,IOC)Context (扩展)Expression Language(查询操作对象)

Data Access/Integration : JDBC ORM OXM JMS Transaction

Web:

AOP:切片编程

TEST:JUnit TestNG

OK,下载spring5,(目前版本) https://github.com/spring-projects/spring-framework

                                         or:  https://github.com/spring-projects/spring-framework/tree/5.0.x 

直接下载zip吧,会快很多。然后解压到D:\java\app\spring5\

双击这个文件吧。。。

总之复制 

 gradlew --no-daemon cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse

到刚才那个路径下执行这命令。需要很长时间,主要是下载国外的东西:不知道gradle有没有国内镜像。。。。

答案是有的:新建init.gradle文件在这个位置

allprojects{
    repositories {
        def ALIYUN_REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public'
        def ALIYUN_JCENTER_URL = 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
        all { ArtifactRepository repo ->
            if(repo instanceof MavenArtifactRepository){
                def url = repo.url.toString()
                if (url.startsWith('https://repo1.maven.org/maven2')) {
                    project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL."
                    remove repo
                }
                if (url.startsWith('https://jcenter.bintray.com/')) {
                    project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL."
                    remove repo
                }
            }
        }
        maven {
                url ALIYUN_REPOSITORY_URL
            url ALIYUN_JCENTER_URL
        }
    }
} 

然后重新执行刚才的命令,哦,快乐很多。。。

就算快也要装一会,这个时候,可以把Eclipse插件装上。

- ADJT: https://www.eclipse.org/ajdt/downloads/    根据你eclipse版本找到  http://download.eclipse.org/tools/ajdt/410/dev/update
- Groovy Eclipse: https://github.com/groovy/groovy-eclipse/wiki 

看吧5分钟完成。。没想到主程序这边还要继续。。。

然后按照上面提示的步骤。导入到eclipse,不用选maven,直接 general\existing projects into workspace ,看到除了spring-aspects有点问题外其他的都没问题了。可能是eclipse还不认识aspects语法。等他building 完成再看下。。。。

 

终于我们可以开始了。

.......无语,教材害人。我们去到spring官网有方法2个步骤搞定lib包:

参考:https://github.com/spring-projects/spring-framework/wiki/Build-Zip-with-Dependencies

第一步:像上面一样下载git zip文件,然后解压执行gradlew depsZip  就完了。

  zip file 在 build/distributions/spring-framework-${VERSION}-dist-with-deps.zip , 

 

 

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐