-
Notifications
You must be signed in to change notification settings - Fork 471
Parameter names not detected in case @AliasFor'ed attributes are used #617
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
Comments
Show me InvestorController and a log output with the investorId. |
Basically, we are coding with Spring cloud. Related code as below:
Debug Log for that request: with root debug opened.
the result is
Thanks. |
@gregturn
|
I don't think so. I spotted one thing to try. I noticed InvestorController's method has |
@gregturn Ok, After I change the name into the same, problem solved, thank you. However, I think that could be a potentially bug or a improve point. I changed the code a little bit. the code as below:
By the way. To make most of preauthorize I have to map String to object first and then use the hateoas. However, It is another bug in #118, and I have to extend the WebMvcConfigurerAdapter, I think that also worth to fix. config file as below.
|
Definitely a bug. You just helped me pinpoint it. Also know how to write a test case. |
BTW, what version of Spring HATEOAS are you using? |
Okay, I pinpointed it. It's when you explicitly use |
@gregturn I am using , spring-boot-starter-hateoas, springBootVersion = '1.5.3.RELEASE', Spring cloud version is Dalston.SR1, thank you. |
When parsing controller's annotations, used composite map of attributes to find the value. Leverages @AliasFor annotations of parameters.
When parsing controller's method parameters, use composite map of parameter annotation's attributes to find the value. Leverages @AliasFor annotations of parameters.
When parsing controller's method parameters, use Spring's SynthesizingMethodParameter to handle alternative attributes.
When parsing controller's method parameters, use Spring's SynthesizingMethodParameter to handle alternative attributes.
When parsing controller's method parameters, use Spring's SynthesizingMethodParameter to handle alternative attributes.
When parsing controller's method parameters, use Spring's SynthesizingMethodParameter to handle alternative attributes.
@caoyuanqi The attached PR should fix the problem at hand so it doesn't happen again. |
Related #621 |
…eclarations. We're now using SynthesizingMethodParameter to correctly support annotation attributes that use @AliasFor. Original pull request: #621.
the code like below,
Return Json is
Any ideas?
The text was updated successfully, but these errors were encountered: