
SpringCloud微服务项目解决OpenFeign 注解导致url冲突
作者:雨林博客 时间: 2025-01-13 03:56:40
我们在开发微服时候,api层作为OpenFeign的二方接口SDK,服务的实现 OpenFeign定义的接口实现在Controller上。这种模式开始没毛病,实则问题挺棘手的,因为@RequestMapping注解会继承到Controller,OpenFeign接口上的@RequestMapping注解也会被接口地址注册器扫描到,从而导致URL地址冲突。...