优化实体命名

This commit is contained in:
zhouhao
2017-01-06 18:10:06 +08:00
parent 2f88889aff
commit 3f61afa70f
132 changed files with 3168 additions and 425 deletions

View File

@@ -25,6 +25,7 @@ import java.lang.annotation.*;
*/
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Authorize {
@@ -49,8 +50,18 @@ public @interface Authorize {
*/
String[] action() default {};
/**
* 验证是否为指定user
*
* @return
*/
String[] user() default {};
/**
* 验证失败时返回的消息
*
* @return
*/
String message() default "{unauthorized}";
/**

View File

@@ -23,7 +23,6 @@ import java.util.Set;
/**
* @author zhouhao
*/
@Authorize(user = "{data.creatorId}")
public interface UserSubject {
String getUsername();