Remove resources automatically added by FF4J

206 Views Asked by At

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>
1

There are 1 best solutions below

0
On

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