<bean id="testScopeDaoImpl" class="org.ymm.dao.impl.TestScopeDaoImpl" scope="prototype"></bean>
<bean id="testScopeDaoImpl" class="org.ymm.dao.impl.TestScopeDaoImpl" scope="singleton"></bean>
BeanFactory bf=new ClassPathXmlApplicationContext("beans.xml"); ITestScopeDao ts1 = bf.getBean("testScopeDaoImpl",ITestScopeDao.class); ITestScopeDao ts2 = bf.getBean("testScopeDaoImpl",ITestScopeDao.class); System.out.println(ts1.hashCode()+"----"+ts2.hashCode());
其他使用不多,不甚解