I am saving files in a temporary directory located outside of my project, and I need to be able to reference them after saving.
I tried to add a resource handler
registry.addResourceHandler("/photo/**").addResourceLocations("D://photo//");
but spring doesn't seem to understand that the file is not in the classpath
21:58:48.293 [http-nio-8080-exec-14] DEBUG oswshSimpleUrlHandlerMapping - Mapping [/photo/a.png] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/D://photo//]], resolvers=[ org.springframework.web.servlet.resource.PathResourceResolver@78 2ce27b]]] and 1 interceptor
is there a prefix or something that i'm missing?
Thanks!
source share