1. Bean的作用范围注解
    * 注解为@Scope(value="prototype"),作用在类上。值如下:
        * singleton     -- 单例,默认值
        * prototype     -- 多例

2. Bean的生命周期的配置(了解)
    * 注解如下:
        * @PostConstruct    -- 相当于init-method
        * @PreDestroy       -- 相当于destroy-method
posted on 2018-12-17 10:21  wyhluckydog  阅读(407)  评论(0编辑  收藏  举报