spring cloud openfeign example:Spring Cloud OpenFeign的演示项目 源码

spiritual44108 26 0 ZIP 2021-04-07 13:04:31

春天的云openfeign示例 使用openfeign的继承特性,发现了一个问题。以本Demo的接口为例: com.example.controller.InheritProviderController.inherit()方法上没有继承到@GetMapping ,但是它为什么还能作为接口被访问?其实这是SpringMVC的功能。接下来写个演示测试下,随便写个接口,能访问就行。然后找到这个方法org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods ,打个断点,该方法主要用来指定Controller的HandlerMethod并将它们注册,注册使用的是org.springframework.web.servlet.handler.AbstractHandlerMetho

用户评论
请输入评论内容
评分:
暂无评论