Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger扫描@RestController获取父类的@RequsetMapping #1288

Open
luyiwei111 opened this issue Jun 27, 2024 · 1 comment
Open

Swagger扫描@RestController获取父类的@RequsetMapping #1288

luyiwei111 opened this issue Jun 27, 2024 · 1 comment

Comments

@luyiwei111
Copy link

luyiwei111 commented Jun 27, 2024

获取到的@RestController是继承于接口类的,其中方法的@RequestMapping在父类接口上。
现在获取requestmapping无法获取到父类方法上的,导致servicestage平台上契约无法展示接口。

是否可以调整swagger扫描request路径,获取到父类的注解,类似于spring的findmergedannotation方法来获取呢?

代码如图:
image
image

springcloud-huawei version:1.11.7-2021.0.x

@chengyouling
Copy link
Collaborator

如果是使用2021.0.x版本,设置spring.cloud.servicecomb.swagger.enableJavaChassisAdapter=false使用springcloud契约生成策略即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants