Greetings. I faced with next issue : I use spring boot 3.1.4 with feign

 <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-openfeign</artifactId>
  <version>4.0.4</version>

I have multiply feign clients. These clients work by https . So I created bean Feign.Builder something like this pseudocode:

@Bean
public Feign.Builder feignBuilder() {
    HostnameVerifier hostnameVerifier = (hostname, session) -> true;
    return Feign.builder()
            .client(new Client.Default(createSocketFactory(), hostnameVerifier));
}

Next moment is interceptor. I have interceptor

public class FooConfiguration {

    @Bean
    public RequestInterceptor fooInterceptor( {
        ... pseudocode
                return interceptor;
    }

}

finally feign client is

@FeignClient(name = "foo-client", url = "${foo-client.url}", configuration = FooConfiguration.class)
public interface FooFeignClient {

    @PostMapping("/foo")
    Dto findFoo(@RequestBody FooDto fooDto);
}

Problem is interceptor does not work and interceptor was not called. It seems like configuration is not applied when I use client with SSL.

P.S. Also, I tested it WITHOUT SSL -when I DONT USE Feign.Builder feignBuilder() it works correctly and Interceptor was triggered in SPRING BOOT 3.1.4. Also I tested it WITH SSL when I USE Feign.Builder feignBuilder() it works correctly and Interceptor was triggered in SPRING BOOT 2.7

Interceptor does not work via feign configuration in spring boot 3.1.4 with SSL.

Comment From: wilkinsona

This has also been duplicated on Stack Overflow: https://stackoverflow.com/questions/77267400/feign-configuration-is-not-applied-in-spring-boot-3-1-4

Comment From: OlgaMaciaszek

Hello, @hryharenkaandrei. Please provide a minimal, complete, verifiable example that reproduces the issue, as a link to a GH repo with an executable app or tests.

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Comment From: drndos

Beware when you have multiple clients not to name them the same name, it must be unique. If you don't then the custom configuration might not apply properly.