spring-cloud / spring-cloud/spring-cloud-openfeign

Apply specific Interceptor at Default Configuration.

Open
#1,273 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
1.3k
Forks
838
Avg merge
2d 11h
Merged PRs (30d)
13

Description

first of all. appreciate that your support.
I'm trying to apply an interceptor but, it comes to be global applying at the all of my Clients.
for example,

@Configuration
..
    @Bean
    public RequestInterceptor requestInterceptorA() {
        return new AuthRequestInterceptor();
    }
 
@Configuration
..
    @Bean
    public RequestInterceptor requestInterceptorB() {
        return new AuthRequestInterceptor2();
    }
 

there are 2 configuration for FeignClient and it works globally.

So, there's a guide to apply specific configuration for a client like this

@FeignClient( ... configuration = XXX.class) //the configuration class should be not @Configuration.

then, it works.

there's my wondering.

when I see your guide

Image

I can set Interceptors by properties like this on yaml.

It doesn't work and I don't know how to apply it.

there's someone who wondering like me for this issues, I can't find the answer.

So, Can you check and lemme know?

thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the YAML interceptor configuration described in the issue and compare it with the @FeignClient configuration approach. Check whether the interceptor is applied globally or only to the intended client; done means the property-based configuration behavior is clarified or corrected for specific clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.