Q:

bad request 400 error while sending request to RestControler Spring MVC

I am getting bad request 400 error while sending request with parameters to controler I have checked whole sysntax but I did not wind any mistake, please look at my code whats wrong there?
var url = contextPath+"/billingControler/getOrdersByResWiseTables";
$.ajax({    
    url      : url,
    data     : "&resID="+$("#rsId").text()+"&tblid="+tableId,  
    type     : "get",     
    dataType : "json" ,
    contentType : 'application/json; charset=utf-8',
    success  : function(response) {             
        console.log(response); 
    } 
}); 

error :
jquery-3.3.1.min.js?_=1520931033076:2 GET http://localhost:8088/smartpos/billingControler/getOrdersByResWiseTables?&resID=11&tblid=3 400 (Bad Request)

please check my java code
@RequestMapping(value="/getOrdersByResWiseTables", method=RequestMethod.GET,   produces="application/json")

public List<OrderBans> getOrdersByResWiseTables(@RequestParam("resId") String resId,@RequestParam("tblid") String tableid) {   
    String result="";
    logger.debug("Started adding order");

    RestypeIDao pdo = new RestypeIDaoImp();  

    List<OrderBans> orderList = pdo.getOrdersResWIseTbles(resId, tableid);

    System.out.println(orderList);  
    logger.debug("end adding order");
    return orderList;

} 

A:

You have extra & in your URL.
Also, you're using data attribute wrong, it should be an object.
Try this:
var url = contextPath+"/billingControler/getOrdersByResWiseTables";
$.ajax({
    url : url,
    data: {
        "resID": $("#rsId").text(),
        "tblid": tableId
    },
    dataType:"json",
    contentType:'application/json; charset=utf-8',
    success:function(response) {
        console.log(response);
    }
});

