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

[BUG] <SpringMvcClientEventListener#buildApiPath return error apiPath when registering method without @ShenyuSpringMvcClient> #5004

Open
1 task done
iYaDongWang opened this issue Aug 14, 2023 · 3 comments · May be fixed by #5006
Labels
type: bug Something isn't working

Comments

@iYaDongWang
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

image
image

Expected Behavior

The name of the rule registered to shenyu admin should be /http/oauth/authorize

Steps To Reproduce

run module shenyu-examples-http

Environment

ShenYu version(s):2.6.1-SNAPSHOT

Debug logs

No response

Anything else?

No response

@iYaDongWang iYaDongWang added the type: bug Something isn't working label Aug 14, 2023
@moremind
Copy link
Member

use this annotation with method

@iYaDongWang
Copy link
Author

use this annotation with method

I don't think it's a good idea to use @ShenyuSpringMvcClient everywhere. In fact, the implementation logic of the SpringMvcClientEventListener#buildApiPath function is that if the client annotation doesn't get the path, it will demote the requestMapping annotation to get the path. what causes the problem is that before calling this function, if the variable methodShenyuClient is null, it assigns the beanShenyuClient to the variable methodShenyuClient.

@moremind
Copy link
Member

a good idea to use @ShenyuSpringMvcClient everywhere. In fact, the implementation logic of the SpringMvcClientEventListener#buildApiPath function is that if the client

need discuss~

@iYaDongWang iYaDongWang linked a pull request Aug 16, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants