applicationContext.xml
<beans>
<bean id="user" class="com.xxx.entity">
</bean>
</beans>
ApplicationContext ac = new ClassPathXmlApplication("classPath:/applicationContext.xml")
User user = (User)ac.getBean("user");
applicationContext.xml
<beans>
<bean id="user" class="com.xxx.entity">
</bean>
</beans>
ApplicationContext ac = new ClassPathXmlApplication("classPath:/applicationContext.xml")
User user = (User)ac.getBean("user");
本文标题:ClassPathXmlApplicationContext 工
本文链接:https://www.haomeiwen.com/subject/bphigjtx.html
网友评论