Load resources recursively with pattern PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); resolver.getResources("classpath*:some/package/name/**/*.xml"); Read Resource content to string import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Scanner; public String getResourceContentAsString(Resource resource) { String resourceContent = null; try (Scanner scanner = new Scanner(resource.getInputStream(), StandardCharsets.UTF_8.name())) { resourceContent = scanner.useDelimiter("\\A").next(); } catch (IOException e) { LOG.debug("Cant read content", e); } return resourceContent; }