您当前的位置: 首页 >  qq_34412985 ar

springboot项目中@PathVariable中get请求中有|报400错误

qq_34412985 发布时间:2020-11-01 15:17:09 ,浏览量:4

http://localhost:9105/publishTheme/ST0821122|461

后端直接改成这种也没用,除非前端也得做加码才可以

@GetMapping("/{id}")
    public Object getPublishTheme(@PathVariable String id) {
        Map params= new HashMap();
        String decodeId="";
        try {
            decodeId=URLDecoder.decode(id,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            logger.error(e.getMessage(), e);
        }
        params.put("ID",decodeId);
        return publishThemeService.getPublishTheme(params);
    }

关注
打赏
查看更多评论

qq_34412985

暂无认证

  • 4浏览

    0关注

    957博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录