摘要: 1.Spring中的对象默认都是 单例模式。 2.使用 @Scope("prototype") 注解来使对象成为多例模式。 3.通过@Autowired 注入的Service 或者是其他实例其实是单例的。 4.通过 ApplicationContext.getBean(C.class); 获取的实例 阅读全文
posted @ 2019-02-28 10:05 GET_CHEN 阅读(9419) 评论(0) 推荐(0)