com.hltech.pact.gen.domain.client.feign.FeignClientsFinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pact-gen Show documentation
Show all versions of pact-gen Show documentation
Automated generation of pact files
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());
}
}