All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hltech.pact.gen.domain.client.feign.FeignClientsFinder Maven / Gradle / Ivy

The newest version!
package com.hltech.pact.gen.domain.client.feign;

import org.reflections.Reflections;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.Set;
import java.util.stream.Collectors;

public class FeignClientsFinder {

    public Set> findFeignClients(String packageRoot) {
        return new Reflections(packageRoot).getTypesAnnotatedWith(FeignClient.class).stream()
            .filter(feignClient -> !feignClient.isAnnotationPresent(ExcludeFeignClient.class))
            .collect(Collectors.toSet());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy