title: Webflux EndpointConfiguration RouterFunctions.route error
body: <p>I am facing an issue with my code when using the RouterFunctions.route method. The code is failing to compile, not sure what I am doing wrong</p>
  
  <p><strong>error description :</strong> </p>
  
  <pre><code>Multiple markers at this line
      - The method route(RequestPredicate, HandlerFunction&lt;T&gt;) in the type RouterFunctions is not 
       applicable for the arguments (RequestPredicate, handler::getById)
      - The type CustomerProfileHandler does not define getById(ServerRequest) that is applicable here
      - The method route(RequestPredicate, HandlerFunction&lt;T&gt;) in the type RouterFunctions is not 
       applicable for the arguments (RequestPredicate, handler::getById)
  </code></pre>
  
  <p><strong>Endpoint Configuration Class</strong></p>
  
  <pre><code>@Configuration
  public class CustomerProfileEndpointConfiguration {
  
      @Bean
      public RouterFunction&lt;ServerResponse&gt; routes(CustomerProfileHandler handler) {
          return RouterFunctions.route(i(GET("/customer/{customerId}")), handler::getById);   
      }
  
      private static RequestPredicate i(RequestPredicate target) {
          return new CaseInsensitiveRequestPredicate(target);
      }
  </code></pre>
  
  <p><strong>Handler Class</strong></p>
  
  <pre><code>@Component
  public class CustomerProfileHandler {
  
      // &lt;1&gt;
      private final CustomerProfileService profileService;
  
      CustomerProfileHandler(CustomerProfileService profileService) {
          this.profileService = profileService;
      }
  
      // &lt;2&gt;
      Mono&lt;ServerResponse&gt; getById(ServerRequest r) {
          return defaultReadResponse(this.profileService.get(id(r)));
      }
   private static Mono&lt;ServerResponse&gt; defaultReadResponse(Publisher&lt;CustomerProfile&gt; profiles) {
          return ServerResponse
              .ok()
              .contentType(MediaType.APPLICATION_JSON_UTF8)
              .body(profiles, CustomerProfile.class);
      }
  
      private static String id(ServerRequest r) {
          return r.pathVariable("customerId");
      }
  </code></pre>