I have a simple and maybe stupid question so apologies in advance..
I have been reading some spring-boot java code recently I am able to understand almost all for I have been able to find documentation everywhere.. but for example for this I still can't figure out the exact meaning (I am not able to find the annotation @P
):
public MyFileEvent getEvent(
@P("user") User user,
@P("file") @Valid @RequestBody EventFile file) throws MyException {
return myService.getFileEvent(file);
}
I understand @Valid
and @RequestBody
but I don't find the meaning of @P
.
According to the javadoc :
"An annotation that can be used along with
AnnotationParameterNameDiscoverer
to specify parameter names. This is useful for interfaces prior to JDK 8 which cannot contain the parameter names."
There are in fact two versions of the @P
annotation:
org.springframework.security.access.method.P
since Spring 3.2 (deprecated) org.springframework.security.core.parameters.P
since Spring 5.0
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.