Spring IOC 下面代码就是Spring的IOC
ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
Spring的两种getBean()
HelloWorld helloworld = (HelloWorld) ctx.getBean("helloworld");
HelloWorld helloworld1 = ctx.getBean(helloworld.getClass());
.class方式只允许applicationContext.xml中存在唯一的id