Required request body is missing:报错解决

1.原因controll的代码使用了@RequestBody注解,前端使用的是get请求应该使用post请求

***//@RequestBody需要使用post***
    public PageResult findPage(@RequestBody TbBrand tbBrand,@RequestParam("pageNum") int pageNum, @RequestParam("pageSize") int pageSize){

        return tbBrandService.findPage(tbBrand,pageNum,pageSize);
    }
    

注意:下面代码应该使用post请求

 $scope.reloadList = function () {
                ***//使用get是错误的应该使用post***
                $http.get("../brand/findPage.do?pageNum=" + $scope.paginationConf.currentPage + "&pageSize=" + $scope.paginationConf.itemsPerPage,
                    $scope.searchEntity).success(function (response) {
                    $scope.list = response.rows;
                    $scope.paginationConf.totalItems = response.total;
                })
            }

你可能感兴趣的:(框架,java,ajax)