Skip to content

Commit 3715c3a

Browse files
committed
refactor: 优化注解,支持在字段上注解.
Signed-off-by: zhouhao <zh.sqy@qq.com>
1 parent 715f476 commit 3715c3a

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/annotation/CreateAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import java.lang.annotation.*;
77

8-
@Target(ElementType.METHOD)
8+
@Target({ElementType.METHOD,ElementType.FIELD})
99
@Retention(RetentionPolicy.RUNTIME)
1010
@Inherited
1111
@Documented

hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/annotation/DeleteAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import java.lang.annotation.*;
77

8-
@Target(ElementType.METHOD)
8+
@Target({ElementType.METHOD,ElementType.FIELD})
99
@Retention(RetentionPolicy.RUNTIME)
1010
@Inherited
1111
@Documented

hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/annotation/QueryAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import java.lang.annotation.*;
77

8-
@Target(ElementType.METHOD)
8+
@Target({ElementType.METHOD,ElementType.FIELD})
99
@Retention(RetentionPolicy.RUNTIME)
1010
@Inherited
1111
@Documented

hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/annotation/Resource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* @see org.hswebframework.web.authorization.events.AuthorizingHandleBeforeEvent
5050
* @since 4.0
5151
*/
52-
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE})
52+
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD,ElementType.FIELD, ElementType.TYPE})
5353
@Retention(RetentionPolicy.RUNTIME)
5454
@Inherited
5555
@Documented

hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/annotation/ResourceAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @see org.hswebframework.web.authorization.Authentication
3030
* @see Permission#getActions()
3131
*/
32-
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
32+
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD,ElementType.FIELD})
3333
@Retention(RetentionPolicy.RUNTIME)
3434
@Inherited
3535
@Documented

hsweb-authorization/hsweb-authorization-api/src/main/java/org/hswebframework/web/authorization/annotation/SaveAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @author zhouhao
1212
* @since 4.0
1313
*/
14-
@Target(ElementType.METHOD)
14+
@Target({ElementType.METHOD,ElementType.FIELD})
1515
@Retention(RetentionPolicy.RUNTIME)
1616
@Inherited
1717
@Documented

0 commit comments

Comments
 (0)