ApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "classpath:applicationContext.xml" });

这样的话执行main 方法的时候就会加载applicationContext.xml中的内容,就能运行了

posted on 2018-01-12 14:21  月亮之城  阅读(220)  评论(0编辑  收藏  举报