spring-cloud-openfeign icon indicating copy to clipboard operation
spring-cloud-openfeign copied to clipboard

Failed to instantiate [feign.Client]

Open anup5708 opened this issue 5 months ago • 0 comments
trafficstars

Describe the bug I am facing one issue while upgrading the version as below.

Spring cloud version from 2021.0.5 to 2024.0.1 Spring boot starter parent from 2.7.5 to 3.4.5 In my configuration class I have written

@Bean public Client method1() throws Exception{ Client a = new Client.Default(getSocketFactory(keystore,pass,truststore,pass), new NoopHostnameVerifier()); } return a;

If I write the same code as below it works

@Bean public static Client method1() throws Exception{ Client a = new Client.Default(getSocketFactory(keystore,pass,truststore,pass), new NoopHostnameVerifier()); } return a;

When I declare the static keywords on the method it started working and getting no issue, please assist.

anup5708 avatar May 22 '25 14:05 anup5708