iocmain.java

来自「是关于struts+hibernate+spring开发宝典的源代码,希望对大家」· Java 代码 · 共 18 行

JAVA
18
字号
package cn.hxex.springcore.ioc;

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

public class IoCMain {

	public static void main(String[] args) {
		
		ClassPathResource resource = new ClassPathResource("cn/hxex/springcore/ioc/IoCBeans.xml");
		BeanFactory factory = new XmlBeanFactory(resource);
		
		IoCService service = (IoCService)factory.getBean( "iocService" );
		service.display();
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?