use of es.home.example.feignexample.customize.CustomTokenGeneratorInterceptor in project PostExamples by deesebc.
the class FeignInterceptor method setup.
@BeforeAll
public static void setup() {
bookClient = Feign.builder().client(new OkHttpClient()).encoder(new GsonEncoder()).decoder(new GsonDecoder()).logger(new Slf4jLogger(BookClient.class)).logLevel(Logger.Level.FULL).requestInterceptor(new CustomTokenGeneratorInterceptor("123456", "654321")).target(BookClient.class, "http://localhost:57010/api/books");
wireMockServer = new WireMockServer(WireMockConfiguration.wireMockConfig().withRootDirectory(FOLDER).port(57010).notifier(new ConsoleNotifier(true)));
wireMockServer.start();
}
Aggregations