You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to use custom value objects in my feign clients.
For example:
@FeignClient
public interface MyClient {
@GetMapping("/users/{userId}")
User getUser(@PathVariable UserId userId);
}
Note how the @PathVariable is typed to UserId, not to String.
I tried adding a org.springframework.core.convert.converter.Converter<UserId,String> in the application context that converts from UserId to String, but that was not used. The toString() method of UserId was still used instead.
The text was updated successfully, but these errors were encountered:
I would like to be able to use custom value objects in my feign clients.
For example:
Note how the
@PathVariable
is typed toUserId
, not toString
.I tried adding a
org.springframework.core.convert.converter.Converter<UserId,String>
in the application context that converts fromUserId
toString
, but that was not used. ThetoString()
method ofUserId
was still used instead.The text was updated successfully, but these errors were encountered: