diff options
author | Vitaly Takmazov | 2019-04-29 14:06:24 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-04-29 14:06:24 +0300 |
commit | c3a9365645ec94d5b7c9778ab32c93e5eb4be5f6 (patch) | |
tree | d853fc7df61fdc18a20a52c93291853796e9a60f /src/main/java/com/juick/service/security/annotation | |
parent | 409ef92da23f4b650340197e7383ba8b528999e4 (diff) |
UserUtils -> @Visitor
Diffstat (limited to 'src/main/java/com/juick/service/security/annotation')
-rw-r--r-- | src/main/java/com/juick/service/security/annotation/Visitor.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/com/juick/service/security/annotation/Visitor.java b/src/main/java/com/juick/service/security/annotation/Visitor.java new file mode 100644 index 00000000..14d7cc87 --- /dev/null +++ b/src/main/java/com/juick/service/security/annotation/Visitor.java @@ -0,0 +1,12 @@ +package com.juick.service.security.annotation; + +import org.springframework.security.core.annotation.AuthenticationPrincipal; + +import java.lang.annotation.*; + +@Target({ ElementType.PARAMETER, ElementType.TYPE }) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@AuthenticationPrincipal(errorOnInvalidType = true, expression = "user") +public @interface Visitor { +} |