postman测试请求参数为@PathVariable 数组格式的接口
·
接收delete请求,restful风格,后台接收的为数组
后台controller代码如下:
/**
* 删除商品分类
*/
// @PreAuthorize("@ss.hasPermi('system:category:remove')")
@Log(title = "商品分类", businessType = BusinessType.DELETE)
@DeleteMapping("/{categoryIds}")
public AjaxResult remove(@PathVariable Long[] categoryIds)
{
return toAjax(shopCategoryService.deleteShopCategoryByCategoryIds(categoryIds));
}
postman接口测试需要在地址栏直接写成:

1,3表示数字类型的数组。
更多推荐


所有评论(0)