Data compatibility configuration method and device based on feign interface and medium
By rewriting Spring Boot's scanning and registration class, obtaining and rewriting the parameter values in the FeignClient annotation, we can achieve compatible configuration of the Feign interface's service name and real address. This solves the configuration complexity problem of Feign remote calls in different environments and improves the efficiency of microservice development.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN YLINK COMPUTING SYST
- Filing Date
- 2022-10-26
- Publication Date
- 2026-07-07
AI Technical Summary
Feign remote calls in Java microservice development cannot simultaneously support API calls within the same registry center and API calls across registry centers. When the environment changes, the code needs to be modified and recompiled, packaged, and deployed, resulting in a complex and inefficient configuration process.
Rewrite the Spring Boot scanning and registration class, obtain the name and url parameter values from the FeignClient annotation through the target scanning and registration class, rewrite according to the parameter type, generate a new SpringBean and register it in the Spring environment to achieve compatible configuration of service name and real address.
No service code needs to be modified when the environment changes, simplifying the process of handling configuration changes, improving the efficiency of microservice development, and supporting compatible calls within the same registry center and across registry centers.
Smart Images

Figure CN115629799B_ABST