Skip to content

Failed to instantiate [feign.Client] #1197

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

Open
anup5708 opened this issue May 22, 2025 · 0 comments
Open

Failed to instantiate [feign.Client] #1197

anup5708 opened this issue May 22, 2025 · 0 comments

Comments

@anup5708
Copy link

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.

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