title: Service Activator without method in Spring Integration Java Config / DSL
body: <p>When using XML-based configuration for <code>service-activator</code> you can exclude the <code>method</code> as follows:</p>
  
  <pre><code>&lt;service-activator input-channel="incomingCustomerChannel" output-channel="outgoingCustomerChannel" ref="customerService" /&gt;
  </code></pre>
  
  <p>This will cause the SI framework to choose the target method in <code>customerService</code> based on the payload. How can I achieve the same functionality using DSL and Java config?</p>
  
  <p>At present I have the following:</p>
  
  <pre><code>@Bean
  public IntegrationFlow customerRequestFlow(ConnectionFactory connectionFactory) {
  
      return IntegrationFlows.from((MessagingGateways g) -&gt; g.jms(connectionFactory)
                                                             .correlationKey("JmsCorrelationID")
                                                             .destination("customer_incoming.queue"))
                                                             .handle("customerService", "addCustomer")
                                                             .get();
  }
  </code></pre>
  
  <p>The service activator is defined as:</p>
  
  <pre><code>@Component
  public class customerService {
  
      @ServiceActivator
      public AddCustomerResponse addCustomer(AddCustomerRequest addCustomerRequest) {
  
          // add customer
      }
  }
  </code></pre>
  
  <p>I have extended the activator to add a <code>deleteCustomer</code> method as follows:</p>
  
  <pre><code>@Component
  public class customerService {
  
      @ServiceActivator
      public AddCustomerResponse addCustomer(AddCustomerRequest request) {
  
          // add customer
      }
  
      @ServiceActivator
      public DeleteCustomerResponse deleteCustomer(DeleteCustomerRequest request) {
  
          // delete customer
      }
  }
  </code></pre>
  
  <p>I cannot simply remove the <code>, "addCustomer"</code> from  <code>.handle("customerService", "addCustomer")</code> as <code>methodName</code> is mandatory. Is it possible to achieve this in Java config / DSL?</p>