---
title: " 详解Spring中bean的作用域 "
author: "qi_ling2005"
date: "2015-12-27T07:24:11Z"
tags: []
categories: ["编程语言"]
slug: "spring-bean"
draft: false
lastmod: "2015-12-27T07:24:11Z"
id: 2266884
url: "https://jarvi.iteye.com/blog/2266884"
---

Spring中bean的作用域有 :

&lt;bean id="role" class="spring.chapter2.maryGame.Role" scope="singleton"/&gt;

&lt;bean id="role" class="spring.chapter2.maryGame.Role" scope="prototype"/&gt;

...

详见：http://blog.csdn.net/providencezy/article/details/1878582