These are chat archives for spring-cloud/spring-cloud

Jan 2018
Abhishek Dujari
Jan 27 2018 00:06
i am not able to figure out how to override resttemplate in configs so it won't use eureka lookup and try normal internet dns resolution instead
i am doing this because I dont have other services in my local dev system and when running tests
Ingo Griebsch
Jan 27 2018 13:39
Hello, Don't know exaclty if this is the right place to ask but I did not found a better channel...
I'm searching for a way to intercept each FeignClient in my service application because I would like to check/log some method parameters.
Played around a little bit with @Aspect and @Pointcut but I cannot catch the @FeignClient's (probably because I have some proxy's inside the ctx and nothing that implements @FeignClient).
So I switched to a feign related RequestInterceptor but the interface and given RequestTemplate instance is not providing the method parameters as separate properties. The only chance I have is to parse the url.
Ingo Griebsch
Jan 27 2018 13:46
I can could it but don't find this solution a good way to go. Having another look at the Feign API shows me nothing which I could use out of the box to validate the method parameters. Contract and Encoder are IMO also not made for my use case.
Therefore I would like to go back to the Aop/Proxy idea but do not know exactly how to define the @Pointcut if I would like to catch all @FeignClient definitions (I don't want to use a specific interface or abstract because I cannot prevent someone is not using that if defining a new @FeignClient).
So has someone maybe a little hint for me how to define an @Aspect or @Pointcut to wrap all @FeignClient's? :)
Marcin Grzejszczak
Jan 27 2018 20:04
@gbtec-ingogriebsch you can check out how I did instrumentation of Feign in Sleuth
and try sth similar
Ingo Griebsch
Jan 27 2018 20:05
@marcingrzejszczak thanks for the hint. Do you have a class name I can start investigating?
this is the main point of entry
Ingo Griebsch
Jan 27 2018 20:07
@marcingrzejszczak Many thanks.The evening is saved... ;)
Marcin Grzejszczak
Jan 27 2018 20:08