摘要: @Component:标注一个普通的Spring Bean类。@Controller:标注控制器组件类。@Service:标注业务逻辑组件类。@Repository:标注DAO组件类。@Scope:指定Bean的作用域。@Resource:配置依赖。@PostConstruct和@PreDestro... 阅读全文
posted @ 2014-05-15 15:18 harryV 阅读(391) 评论(0) 推荐(0) 编辑
摘要: singleton:单体模式,在整个Spring IoC容器中只有一个实例。prototype:原型模式,每次通过容器的getBean获取的bean都会产生一个新的实例。request:对于每次HTTP的请求,使用request定义的bean都会产生一个新的实例。session:对于每次HTTP S... 阅读全文
posted @ 2014-05-15 10:06 harryV 阅读(185) 评论(0) 推荐(0) 编辑