#3 -- Remove from api documentation

This commit is contained in:
Anton Romanov 2023-11-06 19:07:05 +04:00
parent 72df590dae
commit 16c98e1b61
2 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,9 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.CookieLocaleResolver;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
@Configuration
public class MvcConfiguration implements WebMvcConfigurer {
@ -41,6 +44,14 @@ public class MvcConfiguration implements WebMvcConfigurer {
return localeInterceptor;
}
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("ru.ulstu"))
.build();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(localeInterceptor());

View File

@ -9,12 +9,14 @@ import org.springframework.web.bind.annotation.RequestMethod;
import ru.ulstu.fc.rule.model.Antecedent;
import ru.ulstu.fc.rule.model.InferenceForm;
import ru.ulstu.fc.rule.service.FuzzyInferenceService;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Controller
@ApiIgnore
public class InferenceMvcController {
private final FuzzyInferenceService fuzzyInferenceService;