The invention discloses a micro-service merging deployment method and
system based on self-
adaptive routing of a Feign
client, and the method comprises the steps: S100, extracting detailed
metadata of each interface method at the last stage of Spring Boot application starting, and registering the detailed
metadata in a mapping registry; s200, when a Feign
client interface is called, the Feign
client interface is captured and intercepted by a dynamic proxy mechanism of the Feign; s300, analyzing target information of the current Feign request, extracting a URL path to be called and an HTTP method, and selecting a calling method; s400, after it is determined that the
local call is executed, a Spring Security
security authentication object is constructed; s500, matching and converting the parameter
list and the parameter
list of the target controller method, and directly calling the target controller method in the current process; and S600, after the
local method is executed, obtaining a return result, translating the return result into a
return type declared by the Feign client interface, and returning the
return type to the
business code which initially initiates the call along the original path. And the process can be efficiently called without depending on an external service registration center.