Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monir-zaman/91ba0eee319d667f847f11ed8a688584 to your computer and use it in GitHub Desktop.
Save monir-zaman/91ba0eee319d667f847f11ed8a688584 to your computer and use it in GitHub Desktop.
//package its.your.package.name.here
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class ResourceConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
String path = "file:/usr/local/";
registry.addResourceHandler("/content/**")
.addResourceLocations(path);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment