swagger2 中怎么使用get请求传参

时间:2025-03-18 19:29:23
 // 查询商城分类页面的seo详情
    @GetMapping("/shop-category")
    @ResponseBody
    @ApiOperation("查询xxx详情")
    public AjaxResult getWebShopCategoryUrlInfo (@RequestParam @ApiParam(name="categoryId",value="分类id",required=true) String categoryId) {
        OpeSeo result = (SeoRelevanceType.SHOP_PRODUCT_CATEGORY.value(),categoryId);
        return (result);
    }

只需要加上@RequestParam注解即可