apache / apache/servicecomb-java-chassis
按照示例写springmvc写的xml接口,报argument type mismatch
- Langage dominant
- Java
- Étoiles
- 1.9k
- Forks
- 814
- Merge moyen
- 8 j 23 h
- PR mergées (30 j)
- 1
Description
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格式的响应正文
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, spring
- Domaine
- api, backend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100