Commit 23235123 by Dave Syer

Clarification regardinff shared interfaces in server and client

parent 213df388
...@@ -905,8 +905,6 @@ WARNING: There is a limitation with the implementation of fallbacks in Feign and ...@@ -905,8 +905,6 @@ WARNING: There is a limitation with the implementation of fallbacks in Feign and
Feign supports boilerplate apis via single-inheritance interfaces. Feign supports boilerplate apis via single-inheritance interfaces.
This allows grouping common operations into convenient base interfaces. This allows grouping common operations into convenient base interfaces.
Together with Spring MVC you can share the same contract for your
REST endpoint and Feign client.
.UserService.java .UserService.java
[source,java,indent=0] [source,java,indent=0]
...@@ -938,6 +936,11 @@ public interface UserClient extends UserService { ...@@ -938,6 +936,11 @@ public interface UserClient extends UserService {
} }
---- ----
NOTE: It is gernarally not advisable to share an interface between a
server and a client. It introduces tight coupling, and also actually
doesn't work with Spring MVC in its current form (method parameter
mapping is not inherited).
=== Feign request/response compression === Feign request/response compression
You may consider enabling the request or response GZIP compression for your You may consider enabling the request or response GZIP compression for your
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment