public Resource doFilter(ResourceMatchResult filterMatchResult, Set<ResourceLoadingOption> options,
ResourceFilterChain chain) throws ResourceNotFoundException {
Resource resource = chain.doFilter(filterMatchResult, options);
try {
return new InputStreamResource(resource.getInputStream());
} catch (IOException e) {
fail();
return null;
}
}