Serving Static resources from file system | Spring Boot Web

前端 未结 4 630
忘了有多久
忘了有多久 2020-12-14 01:58

Using a Spring Boot web application I trying to serve my static resource from a file system folder outside my project.

Folder structure looks like:-

         


        
4条回答
  •  既然无缘
    2020-12-14 03:03

    file:/// is an absolute URL pointing to the root of the filesystem and, therefore, file:///./ext-resources/ means that Spring Boot is looking for resources in a directory named ext-resources in the root.

    Update your configuration to use something like file:ext-resources/ as the URL.

提交回复
热议问题