apache / apache/servicecomb-java-chassis
按照示例写springmvc写的xml接口,报argument type mismatch
- Lenguaje dominante
- Java
- Estrellas
- 1.9k
- Forks
- 814
- Merge medio
- 8 d 23 h
- PR fusionados (30 d)
- 1
Descripción
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格式的响应正文
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, spring
- Área
- api, backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100