美文网首页
ClassPathXmlApplicationContext 工

ClassPathXmlApplicationContext 工

作者: zzz_0427 | 来源:发表于2025-07-05 22:16 被阅读0次

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