Title: Add supports of generics on RestTemplate · Issue #220 · androidannotations/androidannotations · GitHub
Open Graph Title: Add supports of generics on RestTemplate · Issue #220 · androidannotations/androidannotations
X Title: Add supports of generics on RestTemplate · Issue #220 · androidannotations/androidannotations
Description: With a rest method like this : @Post("/user/infos") ResponseEntity
Open Graph Description: With a rest method like this : @Post("/user/infos") ResponseEntity
X Description: With a rest method like this : @Post("/user/infos") ResponseEntity<String> sendUserInfos(Map<String, Object> infos); AA will generate this method : @Override public ResponseEn...
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/220
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add supports of generics on RestTemplate","articleBody":"With a rest method like this :\n\n``` java\n@Post(\"/user/infos\")\nResponseEntity\u003cString\u003e sendUserInfos(Map\u003cString, Object\u003e infos);\n```\n\nAA will generate this method :\n\n``` java\n@Override\npublic ResponseEntity\u003cString\u003e sendUserInfos(Object\u003einfos) {\n HttpHeaders httpHeaders = new HttpHeaders();\n HttpEntity\u003cObject\u003e\u003e requestEntity = new HttpEntity\u003cObject\u003e\u003e(infos, httpHeaders);\n return restTemplate.exchange(\"http://localhost:8081/epod/rest-services/user/infos\", HttpMethod.POST, requestEntity, String.class);\n}\n```\n\nBut if we change the rest method for this one (without generics) :\n\n``` java\n@Post(\"/user/infos\")\nResponseEntity\u003cString\u003e sendUserInfos(Map infos);\n```\n\nThe generated class will be fine :\n\n``` java\n@Override\npublic ResponseEntity\u003cString\u003e sendUserInfos(Map infos) {\n HttpHeaders httpHeaders = new HttpHeaders();\n HttpEntity\u003cMap\u003e requestEntity = new HttpEntity\u003cMap\u003e(infos, httpHeaders);\n return restTemplate.exchange(\"http://localhost:8081/epod/rest-services/user/infos\", HttpMethod.POST, requestEntity, String.class);\n}\n```\n","author":{"url":"https://github.com/DayS","@type":"Person","name":"DayS"},"datePublished":"2012-06-04T12:23:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/220/androidannotations/issues/220"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:921d632b-cf8f-05b6-7cd6-fe7fc2ca44b6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDB6:42CE1:2D5E6DA:3EAD967:6A60C54B |
| html-safe-nonce | ca7767295b5847f79c77b5678069e6258e63c41ff8ff746734c283e7f1aed29c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREI2OjQyQ0UxOjJENUU2REE6M0VBRDk2Nzo2QTYwQzU0QiIsInZpc2l0b3JfaWQiOiI5MTE0NjI3NDk1Mzg0MTA2MzE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 087aa660ad72db403c72d07e000c05a0a390c4d2f365edff1a8be82c68f9092f |
| hovercard-subject-tag | issue:4886961 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/androidannotations/androidannotations/220/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6a6d25339cd2ebcafd103e0bcbbdb4f26d35429df5329ac90f1dc95ad47fcb4/androidannotations/androidannotations/issues/220 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6a6d25339cd2ebcafd103e0bcbbdb4f26d35429df5329ac90f1dc95ad47fcb4/androidannotations/androidannotations/issues/220 |
| og:image:alt | With a rest method like this : @Post("/user/infos") ResponseEntity |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DayS |
| hostname | github.com |
| expected-hostname | github.com |
| None | e30aeaafb59b2438b8b0aaa24f4c6777e8e86dae0737625adfc928cac5443cd5 |
| turbo-cache-control | no-preview |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 34b43e23ce2dc970fbfce25d0e96500f2af8266d |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width