title: Spring Integration webflux - validate input JSON body
body: <p>Following is my application configuration</p>
  
  <pre><code>@SpringBootApplication
  class DemoApplication {
  
      static void main(String[] args) {
          SpringApplication.run(DemoApplication, args)
      }
  
  
      @Bean
      IntegrationFlow startHeatToJiraFlow() {
          IntegrationFlows
                  .from(WebFlux.inboundGateway("/input1")
                  .requestMapping { m -&gt; m.methods(HttpMethod.POST).consumes(MediaType.APPLICATION_JSON_VALUE) }
                  .requestPayloadType(ResolvableType.forClassWithGenerics(Mono, ServiceInput))
          )
                  .channel("inputtestchannel")
                  .get()
      }
  
      @ServiceActivator(inputChannel = "inputtestchannel")
      Map replyMessage() {
          return [success: true]
      }
  
  
      class ServiceInput {
          @NotBlank
          String input1
          @NotBlank
          String input2
      }
  }
  </code></pre>
  
  <p>I expect the following curl request to give me an error since I am not giving an input JSON in the  body.</p>
  
  <pre><code>curl  -X POST localhost:8080/input1 -H "Content-Type:application/json"
  </code></pre>
  
  <p>Instead I am receiving a 200 response </p>
  
  <pre><code>{"success":true}
  </code></pre>
  
  <p>What am I doing wrong here ? </p>