在独立Java类中使用ClassPathXmlApplicationContext

我还没有接触到 Spring.我在我的系统中的一个独立java项目中看到了下面的代码.你能帮我理解下面的代码.我无法在项目中看到spring.xml – 它是否必须存在并且缺失?
appContext = new ClasspathXmlApplicationContext(new String[] {
        "classpath*:/meta-inf/spring.xml","classpath*:myapplication-application-context.xml"
        });

解决方法

classpath *语法意味着Spring将在类路径中搜索名为/meta-inf/spring.xml和myapplication-application-context.xml的所有资源,并将它们合并到上下文中.这包括查看项目中的JAR文件,因此主项目文件中可能没有任何可见文件.

相关文章

最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤...
/*HashSet 基本操作 * --set:元素是无序的,存入和取出顺序不...
/*list 基本操作 * * List a=new List(); * 增 * a.add(inde...
/* * 内部类 * */ 1 class OutClass{ 2 //定义外部类的成员变...
集合的操作Iterator、Collection、Set和HashSet关系Iterator...
接口中常量的修饰关键字:public,static,final(常量)函数...