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

2. Bean的生命周期的配置(了解)
    * 注解如下:
        * @PostConstruct    -- 相当于init-method
        * @PreDestroy       -- 相当于destroy-method

相关文章:

  • 2022-01-30
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2023-04-06
  • 2021-08-18
  • 2022-01-12
  • 2022-12-23
猜你喜欢
  • 2022-01-11
  • 2022-12-23
  • 2021-07-29
  • 2022-01-01
  • 2021-09-20
  • 2021-09-21
  • 2021-04-27
相关资源
相似解决方案