📄 iocmain.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -