apache / apache/servicecomb-java-chassis
按照示例写springmvc写的xml接口,报argument type mismatch
- Vorherrschende Sprache
- Java
- Sterne
- 1.9k
- Forks
- 814
- Ø Merge
- 8 T. 23 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
api:
`@RequestMapping(path = "/aaaa", `
`method = RequestMethod.POST, `
`produces = MediaType.APPLICATION_XML_VALUE)`
`public AAA aaaa(@RequestBody AAA aaa) {`
`return person;`
` }`
入参类:
`@Data`
`@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)`
`@XmlRootElement(name = "aaa")`
`public class AAA {`
`@XmlElement(name = "bbb")`
`private String bbb;`
`}`
postman请求正文:
``
``
`sss`
``
``
另写一个无入参的接口,也是返回AAA,在postman那里是可以看到正确的xml格式的响应正文
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with the Spring MVC endpoint using @RequestBody AAA and the AAA class with JAXB annotations. Reproduce the POST request from Postman with the provided XML, then compare it with the no-argument endpoint that returns XML correctly. Done means the request no longer produces an argument type mismatch and the XML response remains correct.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, spring
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100