FINERACT-910: Serving apiDocs as part of the fineract-provider
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
dec9d21f71
commit
b58404be41
+10
-6
@@ -27,11 +27,15 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
@Configuration
|
||||
public class WebFrontEndConfiguration implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/apps/**").addResourceLocations("file:" +
|
||||
System.getProperty("user.dir") + System.getProperty("file.separator") +
|
||||
"apps" + System.getProperty("file.separator"));
|
||||
}
|
||||
private static final String[] CLASSPATH_RESOURCE_LOCATIONS = {
|
||||
"classpath:/static/", "classpath:/public/"
|
||||
};
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
if (!registry.hasMappingForPattern("/**")) {
|
||||
registry.addResourceHandler("/**").addResourceLocations(
|
||||
CLASSPATH_RESOURCE_LOCATIONS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user