1

recently i have added FF4j dependency on my application, after that new resource end points have appeared in my swagger ui, is there any way to disable these end points?

enter image description here

the dependency add was

<dependency>
 <groupId>org.ff4j</groupId>
 <artifactId>ff4j-spring-boot-starter</artifactId>
 <version>${ff4j.version}</version>
</dependency>
<dependency>
Deb Das
  • 264
  • 1
  • 7

1 Answers1

1

If you are using SpringDoc:

springdoc.packages-to-exclude=com.unwantedPackage

If you are using SpringFox:

    @Bean
    public Docket productApi() {
        return new Docket(DocumentationType.SWAGGER_2)
                .select().paths(Predicate.not(PathSelectors.regex("/api/ff4j/store.*")).apis(RequestHandlerSelectors.basePackage("com.package.controller"))
                .paths(PathSelectors.any())
                .build().apiInfo(apiInfo());
    

Remove Basic Error Controller In SpringFox SwaggerUI

JCompetence
  • 6,997
  • 3
  • 19
  • 26