Created
April 6, 2022 19:37
-
-
Save monir-zaman/91ba0eee319d667f847f11ed8a688584 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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