FINERACT-1044 Added redirects in swagger-ui
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
6a8a993670
commit
a440d56392
+7
@@ -21,6 +21,7 @@ package org.apache.fineract.infrastructure.core.boot;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@EnableWebMvc
|
||||
@@ -41,4 +42,10 @@ public class WebFrontEndConfiguration implements WebMvcConfigurer {
|
||||
|
||||
registry.addResourceHandler("/swagger-ui/**").addResourceLocations(SWAGGER_RESOURCE_LOCATIONS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
registry.addRedirectViewController("/swagger-ui", "/swagger-ui/index.html");
|
||||
registry.addRedirectViewController("/swagger-ui/", "/swagger-ui/index.html");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user