Skip to content

Does @SpringQueryMap Support Multiple Annotations or Nested Objects? #1164

Open
@chs98412

Description

@chs98412
  1. Can I use multiple @SpringQueryMap annotations in a single method?
@FeignClient(name = "exampleClient", url = "https://api.example.com")
interface ExampleClient {

    @GetMapping("/example")
    fun search(
        @SpringQueryMap params1: QueryParams,
        @SpringQueryMap params2: QueryParams
    ): String
}
  1. Does @SpringQueryMap support nested objects?
data class ParentParam(
    val a: String,
    val child: ChildParam // Nested object
)

data class ChildParam(
    val b: String,
    val c: String
)

@FeignClient(name = "exampleClient", url = "https://api.example.com")
interface ExampleClient {
    @GetMapping("/example")
    fun search(@SpringQueryMap params: ParentParam): String
}

As far as I know, spring-cloud-openfeign does not support either of these.
Why doesn’t spring-cloud-openfeign support them?

If supporting these features does not go against your direction and you have no plans to implement them, would it be okay if I attempt to make the modifications and submit a PR?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions