0%

Spring-Tips

阅读更多

1 在classpath中以通配符的方式查找资源

可以使用PathMatchingResourcePatternResolver

1
2
3
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();

org.springframework.core.io.Resource[] resources = resolver.getResources("classpath*:liuye/**.json");