search

Home  >  Q&A  >  body text

java自定义参数注解@Target(ElementType.PARAMETER)无效?

阿神阿神2813 days ago1181

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-18 10:45:16

    If I remember correctly, the @annotation expression will only look for annotations on methods. Have you tried customizing an annotation on the method?

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 10:45:16

    The annotations on the method can implement the springHandlerMethodArgumentResolver interface.
    You can refer to customizing @CurrentUser to get the current logged in user

    reply
    0
  • Cancelreply