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

Multiple implementations of ResponseInterceptor fail to trigger

Open marcdv opened this issue 11 months ago • 10 comments

Describe the bug I have 2 implementations of ResponseInterceptor, both fail to trigger in 4.1.0. If I remove one of them, then it works.

@Component
public class AuditorGatewayResponseInterceptor implements ResponseInterceptor {

//// removed
}
@Component
public class AnotherResponseInterceptor implements ResponseInterceptor {

//removed
}

marcdv avatar Mar 20 '24 10:03 marcdv

Hello @marcdv, thanks for creating an issue. Please provide a minimal, complete, verifiable example that reproduces the issue, as a link to a GitHub repo with an executable app or tests.

Please learn how to properly format code and logs.

OlgaMaciaszek avatar Mar 20 '24 18:03 OlgaMaciaszek

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.

spring-cloud-issues avatar Mar 27 '24 18:03 spring-cloud-issues

hello @marcdv , see gh-1003

galaxy-sea avatar Apr 01 '24 13:04 galaxy-sea

Please review https://github.com/marcdv/testFeign for an example

Steps to reproduce

  1. Start the server gradle bootrun

  2. call the API GET http://localhost:8080/api/test

  3. Review logs in console (note no logs)

  4. Comment out line 10 (@Component) in AResponseInterceptor.java

  5. Restart the server

  6. Call the API as above

  7. Review logs (note BResponseInterceptor was called)

marcdv avatar Apr 08 '24 10:04 marcdv

Thanks, @marcdv. That's actually never been supported and also the docs only show a way to provide one interceptor, so this would be an enhancement. Since this project is now in maintenance mode (suggested replacement: Spring Interface Clients), we are not planning on adding new features ourselves, but we still review small community PR. I see @galaxy-sea has submitted a PR for this, but it has breaking changes, so can only be considered for a major release and I will mark it as such, however at this point it has not been decided if there will be another major of this project.

OlgaMaciaszek avatar Apr 15 '24 15:04 OlgaMaciaszek

Hey @OlgaMaciaszek 👋🏻 , just asking, as I've seen you mention that spring-cloud-openfeign is now under maintenance mode a couple of times:

Could you maybe point me to Docs where this is explained? Would it make sense to add this info to the Repo Readme?

Thanks in advance :)

P.S.: The link above to the Spring Interface Clients does not seem to work!

LouisXhaferi avatar Apr 16 '24 06:04 LouisXhaferi

Here a fixed linked: Spring Interface Clients.

askingcat avatar Apr 16 '24 06:04 askingcat

Hi @askingcat . That's strange. The link works for me. Can you please try it again (maybe the site was temporarily down)? Here it is, in the warning section: https://docs.spring.io/spring-cloud-openfeign/reference/

OlgaMaciaszek avatar Apr 16 '24 10:04 OlgaMaciaszek

Thank you for sharing that link! :)

Still off-topic, but regarding the link to the Spring Interface Client Docs: Nope, still can't see it. But also, when I drill down to the list of releases at https://docs.spring.io/spring-framework/docs/ I found no entry for 6.0.6-SNAPSHOT, as used in the url, but there is one for 6.0.x-SNAPSHOT, so that might be a reason 🤷🏻 @askingcat's link points to 6.0.6 so that obviously works.

image

LouisXhaferi avatar Apr 16 '24 10:04 LouisXhaferi

Thanks @LouisXhaferi, right, possibly something cached on my end. This should work: https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface

OlgaMaciaszek avatar Apr 16 '24 11:04 OlgaMaciaszek