Spring boot Swagger将查询参数转换为post正文

Spring boot Swagger将查询参数转换为post正文,spring-boot,swagger,swagger-ui,Spring Boot,Swagger,Swagger Ui,我在SpringBoot@RestController中有一个POST操作,它接受一个查询参数和一个请求正文: @RequestMapping(path = "/benchmark", method = POST) public String startBenchmark(@QueryParam("numMessages") int numMessages, @RequestBody String body) { Swagger UI将“numMessages”呈现为参数类型主体。有没有办法纠

我在SpringBoot@RestController中有一个POST操作,它接受一个查询参数和一个请求正文:

@RequestMapping(path = "/benchmark", method = POST)
public String startBenchmark(@QueryParam("numMessages") int numMessages, @RequestBody String body) {

Swagger UI将“numMessages”呈现为参数类型主体。有没有办法纠正这个问题?

用Spring的@RequestParam代替Jersey@QueryParam

用Spring的@RequestParam代替Jersey@QueryParam

就是这么做的,不过你比我快就这么做了,不过你比我快