ApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "classpath:applicationContext.xml" });
这样的话执行main 方法的时候就会加载applicationContext.xml中的内容,就能运行了