第1章.Spring概述 Spring概述 The Spring Framework is a lightweight solution and a potential one-stop-shop for building your enterprise-ready applications. 特点:轻量级.一站式.开发框架 历史: 2002 Rod Johnson, Apache 2.0 License 初始版, an idea of Spring came out due to the ba…
1.1 Spring 概述 1.1.1 Spring 的简史 第一阶段:xml配置 Spring 1.x时代使用xml配置Bean 第二阶段:注解配置 Spring2.x Spring 提供了声明Bean的注解(如@Component.@Service),应用的基本配置(如数据库配置)用xml ,业务配置用注解 第三阶段:Java配置 Spring3.x&4.x 使用Java配置可以让你更好的理解你配置的Bean 1.1.1 Spring 概述 Spring 使用简单的POJO对象进行企…
第4章 Spring Bean装配(下) 介绍Bean的注解实现,Autowired注解说明,基于java的容器注解说明,以及Spring对JSR支持的说明 4-1 Spring Bean装配之Bean的定义及作用域的注解实现 base-package="org.example":扫描这个包下的所有类 可以扫描基于类的注解 只能在完成bean的注册之后,去处理bean中的方法或者是成员变量的注解 自己的理解:类被自动发现并注册bean的条件时:使用注解. 4-2 Spring Bean…