开发过程记录

step1,建立maven web project,并且在项目中集成spring framework的核心功能模块spring-context

    修改spring framework的logging插件,去除默认插件commons-logging,集成其他三方插件SLF4J、Log4J

    教程:实际操作过程

step2,在maven标准目录结构下添加新的文件夹,并且修改编译所得class文件的输出路径

    实际操作过程:参见教程

step3,测试spring的IOC容器功能

    • step1中已经集成了spring framework的spring-context模块和spring-core模块,这里只需要再添加spring-beans模块即可
        • <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-beans</artifactId>
                  <scope>runtime</scope>
              </dependency   
    • 了解spring framework的控制反转和依赖注入功能
        • 教程:spring的DI和IOC
        • spring的IOC容器控制所有beans(即类对象)的实例化、beans之间的依赖关系的配置、bean对象的组装过程
            • 其中spring framework中配置beans之间的依赖关系时,有三种配置方法
    • 添加其他jar包并且编写第一个bean文件,并使用xml-based configuration配置bean,具体操作过程参见博客          

 step4,在项目中集成Spring MVC,并且测试Spring MVC

posted on 2017-01-04 16:34  LXRM-JavaWeb、ML  阅读(120)  评论(0编辑  收藏  举报

导航