spring通配符jar资源加载有关问题

spring通配符jar资源加载问题jar资源加载问题?问题:Spring加载jar中的:classpath*:xxx/applicationContext

spring通配符jar资源加载问题

jar资源加载问题

?

    问题:Spring加载jar中的:classpath*:xxx/applicationContext*.xml文件失败环境:
      jar文件中文件: classpath*:xxx/applicationContext*.xmlEclipse使用“导出”jar时未选择”Add directory entries”(选择后,不会出现此问题)如下图:
      spring通配符jar资源加载有关问题
      ?
    分析:
      代码:
      ?因为spring支持通配符加载资源,所以使用:Resource[] rootDirResources = getResources(rootDirPath);来加载目录,再定位子资源subPattern的路径,即可支持通配符加载资源
    1 楼 skzr.org 2011-02-14   http://download.oracle.com/javase/6/docs/api/index.html

    JDK提供了一个JarFile的类