@Bean public ThriftServiceRegistrationBean helloThriftService() { return new ThriftServiceRegistrationBean() .setServiceName("helloService") .setService(THttpService.of((HelloService.Iface) name -> "hello " + name)) .setPath("/thrift") .setDecorators(ImmutableList.of(LoggingService.newDecorator())) .setExampleRequests(Collections.singleton(new hello_args("nameVal"))) .setExampleHeaders(Collections.singleton(HttpHeaders.of( HttpHeaderNames.of("x-additional-header"), "headerVal"))); } }