package com.zby;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

import com.zby.bean.CommonBean;

/**
 * 
 * @author zby
 * @date 2018年4月21日
 * @description
 */
@SuppressWarnings("deprecation")
public class AXmlBeanFactoryMain {

	public static void main(String[] args) {
		BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("applicationContext.xml"));
		CommonBean commonBean = (CommonBean) beanFactory.getBean("commonBean");
		commonBean.sayHello();
	}

}

  有一起看的可以留言分享下经验或者有什么问题也可以留下大家一起解决。

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-14
  • 2021-08-21
  • 2021-08-05
  • 2022-01-14
  • 2022-12-23
  • 2021-11-11
相关资源
相似解决方案