读书人

spring中登记bean(通过代码动态注册)

发布时间: 2012-11-05 09:35:12 作者: rapoo

spring中注册bean(通过代码动态注册)

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"><bean id="beanFactoryAwareBean" class="BeanFactoryAwareBean"></bean></beans>

结果:

setBeanFactory.........................
ContextRefreshed...................
chinfeng--------------------

读书人网 >编程

热点推荐