title: java spring boot HTTP POST request not working
body: <p>For my application I am writing a POST request to send array of parameters from a checkbox list. Its working for get request but not working for post request. What is the error in my code.</p>
  
  <p>My code on the client side for sending ajax request to the server.</p>
  
  <pre><code>$(".add").click(function(){
  
      monitoring.length=0;
      nonMonitoring.length=0;
      $('.modal-body input:checked').each(function() {
          monitoring.push($(this).val());
          });
  
      $('.addkeywords input:checked').each(function() {
          nonMonitoring.push($(this).val());
          });
  
  
  //  alert(monitoring[2]+ " " + nonMonitoring[2]);
      var monitoringLength=monitoring.length;
      var nonMonitoringLength=nonMonitoring.length;
  
      $.ajax({
              type : "POST",
              url : '/rest/channelstats/my/rest/controller',
              data : {
              //  monitoring : monitoring,
              //  nonMonitoring: nonMonitoring,
                  monitoringLength: monitoringLength,
                  nonMonitoringLength: nonMonitoringLength,
  
              },
              success : function(data) {
  
              //  var keywordsList=data
                  //console.log(keywordsList);
              //  htm = "" ;
  
  
              }
  
  
  });
  
  
      })
  </code></pre>
  
  <p>My java code on the server side.</p>
  
  <pre><code>@RequestMapping(value="/rest/channelstats/my/rest/controller",method = RequestMethod.POST)
  public void monitorKeywords(@RequestParam(value="monitoringLength",required=true)int monitoringLength,@RequestParam(value="nonMonitoringLength",required=true)int nonMonitoringLength){
      System.out.println("MonitoringLength =&gt;" +monitoringLength);
      System.out.println("NonMonitoringLength=&gt;" +nonMonitoringLength);
  
  }
  
  }
  </code></pre>
  
  <p>Its working for HTTP GET requests but not working for POST requests.How should I solve this problem?</p>