ssm

spring 学习笔记2

https://wenku.baidu.com/view/2297e8e1fc4ffe473268abff.html

spring学习笔记

https://wenku.baidu.com/view/a7f05922a5e9856a561260d1.html

1. 
初始化bean的时机:
Lazy-init 为false,spring启动时自动创建
2.
创建和销毁方法
init-method destory-method ,scope=singleton时有效

3. 参数注入主要通过setter方法
4.注解注入 --
a. 引入context命名空间
b、在配置文件中加入
context:annotation-config  base-package=标签
注册了多个对注释进行解析的处理器
@Autowired 默认类型装配 
可与@Qualifier结合
@Resource 默认名称装配,找不到再按类型

@Service @Controller @Repository
@Component 

ssm redis - 设计模式

 

maven

posted @ 2018-01-04 19:59  cnchengv  阅读(78)  评论(0)    收藏  举报