I'd like to add a resource folder relative to the location of the jar (in addition to packaged resources within my jar), for example:
/Directory
Application.jar
/resources
test.txt
I've tried the following:
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/resources/", "file:/resources/");
}
I've also tried:
.addResourceLocations("/resources/", "file:resources/");
Accessing http://localhost:8080/resources/test.txt
with either setup leads to a whitelabel error page. How can I resolve this?