Search in sources :

Example 1 with FileUrlResource

use of org.springframework.core.io.FileUrlResource in project spring-framework by spring-projects.

the class PathResourceResolverTests method resolveWithEncodedPath.

// gh-22272
@Test
public void resolveWithEncodedPath() throws IOException {
    Resource classpathLocation = new ClassPathResource("test/", PathResourceResolver.class);
    testWithEncodedPath(classpathLocation);
    testWithEncodedPath(new FileUrlResource(classpathLocation.getURL()));
}
Also used : UrlResource(org.springframework.core.io.UrlResource) ClassPathResource(org.springframework.core.io.ClassPathResource) FileUrlResource(org.springframework.core.io.FileUrlResource) Resource(org.springframework.core.io.Resource) FileUrlResource(org.springframework.core.io.FileUrlResource) ClassPathResource(org.springframework.core.io.ClassPathResource) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1 FileUrlResource (org.springframework.core.io.FileUrlResource)1 Resource (org.springframework.core.io.Resource)1 UrlResource (org.springframework.core.io.UrlResource)1