{"id":1963,"date":"2023-04-01T10:28:09","date_gmt":"2023-04-01T02:28:09","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1963"},"modified":"2023-04-22T08:35:42","modified_gmt":"2023-04-22T00:35:42","slug":"spring-cloud-feign-get-request-object-parameter","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/04\/01\/spring-cloud-feign-get-request-object-parameter\/","title":{"rendered":"Spring Cloud Feign Get\u8bf7\u6c42\u4f20\u5bf9\u8c61\u53c2\u6570"},"content":{"rendered":"<p>\u524d\u7f6e\u8bf4\u660e\uff0c\u6709A\u3001B\u4e24\u4e2a\u670d\u52a1\uff0cA\u670d\u52a1\u8c03\u7528B\u670d\u52a1\uff0cB\u670d\u52a1\u63a5\u53e3\u662fGet\u7c7b\u578b\uff0c\u63a5\u53d7\u53c2\u6570\u5bf9\u8c61<\/p>\n<p>feign get\u8bf7\u6c42\u4f20\u5bf9\u8c61\u53c2\u6570\u5206\u4e24\u79cd\u60c5\u51b5<\/p>\n<h3>\u7248\u672c\u57282.1\u4e4b\u524d\uff0c\u5219A\u670d\u52a1\u4f7f\u7528Map map\u66ff\u4ee3\u5bf9\u8c61\u4f20\u7ed9B\u670d\u52a1<\/h3>\n<p><!-- more --><\/p>\n<pre><code class=\"language-java\">\/\/A-service\n@ApiOperation(value = &quot;\u67e5\u8be2xx&quot;, httpMethod = &quot;GET&quot;)\n@GetMapping(&quot;\/maps&quot;)\npublic ReturnEntity getOrgPositionInMap(OrganizationMapQO organizationMapQO) {\n    HashMap map = new HashMap(BeanMap.create(organizationMapQO));\n    ReturnEntity returnEntity = sysLoginFeignClient.getOrgPositionInMap(map);\n    return returnEntity;\n}\n\n\/\/feign-service\n@ResponseBody\n@GetMapping(value = &quot;\/organizations\/maps&quot;, consumes = MediaType.APPLICATION_PROBLEM_JSON_UTF8_VALUE, produces = &quot;application\/json&quot;)\nReturnEntity getOrgPositionInMap(@RequestParam Map map);\n\n\/\/B-service\n@ApiOperation(value = &quot;\u67e5\u8be2xx&quot;,  httpMethod = &quot;GET&quot;)\n@GetMapping(&quot;\/maps&quot;)\npublic List&lt;OrganizationMapVO&gt; getOrgPositionInMap(OrganizationMapQO organizationMapQO) {\n    return sysDeptService.getOrgPositionInMap(organizationMapQO);\n}<\/code><\/pre>\n<h3>\u7248\u672c\u57282.1\u4e4b\u540e\uff0c\u5728feign-service\u4e2d\u4f7f\u7528@SpringQueryMap<\/h3>\n<pre><code class=\"language-java\">\/\/feign-service\n@ResponseBody\n@GetMapping(value = &quot;\/organizations\/maps&quot;, consumes = MediaType.APPLICATION_PROBLEM_JSON_UTF8_VALUE, produces = &quot;application\/json&quot;)\nReturnEntity getOrgPositionInMap(@SpringQueryMap OrganizationMapQO organizationMapQO);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u7f6e\u8bf4\u660e\uff0c\u6709A\u3001B\u4e24\u4e2a\u670d\u52a1\uff0cA\u670d\u52a1\u8c03\u7528B\u670d\u52a1\uff0cB\u670d\u52a1\u63a5\u53e3\u662fGet\u7c7b\u578b\uff0c\u63a5\u53d7\u53c2\u6570\u5bf9\u8c61 feign get\u8bf7\u6c42\u4f20\u5bf9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[251],"class_list":["post-1963","post","type-post","status-publish","format-standard","hentry","category-spring-cloud","tag-feign"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1963"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1963\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}