标签:ant factor font mat [] com resolve min size
PathMatchingResourcePatternResolver是一个Ant通配符模式的Resource查找器,可以用来查找类路径下或者文件系统中的资源。
classpath: 用于加载类路径(包括jar包)中的一个且仅一个资源
classpath*: 用于加载类路径(包括jar包)中的所有匹配的资源
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
Resource[] resources = null;
//加载一个资源
resources = resolver.getResources("classpath:META-INF/spring.factories");
resources = resolver.getResources("META-INF/spring.factories");
resources = resolver.getResources("http://www.baidu.com");
//加载多个资源
resources = resolver.getResources("classpath*:META-INF/spring.factories");
resources = resolver.getResources("classpath*:META-INF/*.factories");
resources = resolver.getResources("file:d:/*.txt");
resources = resolver.getResources("classpath*:com/seasy/**/*.class");
资源查找器PathMatchingResourcePatternResolver的使用
标签:ant factor font mat [] com resolve min size
原文地址:https://www.cnblogs.com/hfultrastrong/p/10482950.html