title: Spring Boot/Kotlin ignore value field of @QueryParam
body: <p>I have a Spring Boot/Kotlin web application and a controller that takes a query param.</p>
  
  <p>Here's my controller method:</p>
  
  <pre><code>import org.springframework.web.bind.annotation.GetMapping
  import org.springframework.web.bind.annotation.ResponseBody
  import javax.ws.rs.Produces
  import javax.ws.rs.QueryParam
  ...
  @GetMapping("/items")
  @ResponseBody
  @Produces(MediaType.APPLICATION_JSON_VALUE)
  fun getItems(@QueryParam("n") count: Int? = null): Collection&lt;MyItem&gt;  {
      return myItemService.list(count)
  }
  </code></pre>
  
  <p>The following cURL results in a null <code>count</code> parameter:</p>
  
  <pre><code>curl http://localhost:8080/items?n=25
  </code></pre>
  
  <p>Instead, Spring Boot always uses the variable name as the query param value:</p>
  
  <pre><code>curl http://localhost:8080/items?count=25
  </code></pre>
  
  <p>What gives? Is this a bug in Spring Boot, or did the Spring team intentionally ignore the documentation on how <code>@QueryParam</code> should work and choose to favor variable name over annotation value?</p>