Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chs98412 opened this issue Feb 12, 2025 · 0 comments
Open

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

chs98412 opened this issue Feb 12, 2025 · 0 comments

Comments

@chs98412
Copy link

  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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants