mirror of https://gitee.com/stylefeng/roses
【7.6.0】【scanner】从新整理资源标识,增加一个权限标识的编码
parent
92a3a57b6e
commit
fb31f82dc7
|
@ -24,6 +24,7 @@
|
||||||
*/
|
*/
|
||||||
package cn.stylefeng.roses.kernel.scanner.api.annotation;
|
package cn.stylefeng.roses.kernel.scanner.api.annotation;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum;
|
import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum;
|
||||||
import org.springframework.core.annotation.AliasFor;
|
import org.springframework.core.annotation.AliasFor;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -69,19 +70,23 @@ public @interface ApiResource {
|
||||||
String name() default "";
|
String name() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是菜单(true-是菜单标识,false-不是菜单标识)
|
* 当前接口是否需要登录(true-需要登录,false-不需要登录)
|
||||||
*/
|
|
||||||
boolean menuFlag() default false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 需要登录(true-需要登录,false-不需要登录)
|
|
||||||
*/
|
*/
|
||||||
boolean requiredLogin() default true;
|
boolean requiredLogin() default true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需要鉴权(true-需要鉴权,false-不需要鉴权)
|
* 当前接口是否需要鉴权(true-需要鉴权,false-不需要鉴权)
|
||||||
|
* <p>
|
||||||
|
* 【7.6.0】修改,默认改为false不需要权限校验
|
||||||
*/
|
*/
|
||||||
boolean requiredPermission() default true;
|
boolean requiredPermission() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前接口需要的权限标识(菜单的编码或者菜单功能的编码,从sys_menu表或者sys_menu_options表查询)
|
||||||
|
* <p>
|
||||||
|
* 如果requiredPermission = true,则需要填写此编码
|
||||||
|
*/
|
||||||
|
String requirePermissionCode() default StrUtil.EMPTY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是视图类型:true-是,false-否
|
* 是否是视图类型:true-是,false-否
|
||||||
|
@ -99,19 +104,16 @@ public @interface ApiResource {
|
||||||
/**
|
/**
|
||||||
* 请求路径(同RequestMapping)
|
* 请求路径(同RequestMapping)
|
||||||
*/
|
*/
|
||||||
@AliasFor(annotation = RequestMapping.class)
|
@AliasFor(annotation = RequestMapping.class) String[] path() default {};
|
||||||
String[] path() default {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求的http方法(同RequestMapping)
|
* 请求的http方法(同RequestMapping)
|
||||||
*/
|
*/
|
||||||
@AliasFor(annotation = RequestMapping.class)
|
@AliasFor(annotation = RequestMapping.class) RequestMethod[] method() default {};
|
||||||
RequestMethod[] method() default {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同RequestMapping
|
* 同RequestMapping
|
||||||
*/
|
*/
|
||||||
@AliasFor(annotation = RequestMapping.class)
|
@AliasFor(annotation = RequestMapping.class) String[] produces() default {};
|
||||||
String[] produces() default {};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
*/
|
*/
|
||||||
package cn.stylefeng.roses.kernel.scanner.api.annotation;
|
package cn.stylefeng.roses.kernel.scanner.api.annotation;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum;
|
import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum;
|
||||||
import org.springframework.core.annotation.AliasFor;
|
import org.springframework.core.annotation.AliasFor;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -64,19 +65,23 @@ public @interface GetResource {
|
||||||
String name() default "";
|
String name() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是菜单(true-是菜单标识,false-不是菜单标识)
|
* 当前接口是否需要登录(true-需要登录,false-不需要登录)
|
||||||
*/
|
|
||||||
boolean menuFlag() default false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 需要登录(true-需要登录,false-不需要登录)
|
|
||||||
*/
|
*/
|
||||||
boolean requiredLogin() default true;
|
boolean requiredLogin() default true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需要鉴权(true-需要鉴权,false-不需要鉴权)
|
* 当前接口是否需要鉴权(true-需要鉴权,false-不需要鉴权)
|
||||||
|
* <p>
|
||||||
|
* 【7.6.0】修改,默认改为false不需要权限校验
|
||||||
*/
|
*/
|
||||||
boolean requiredPermission() default true;
|
boolean requiredPermission() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前接口需要的权限标识(菜单的编码或者菜单功能的编码,从sys_menu表或者sys_menu_options表查询)
|
||||||
|
* <p>
|
||||||
|
* 如果requiredPermission = true,则需要填写此编码
|
||||||
|
*/
|
||||||
|
String requirePermissionCode() default StrUtil.EMPTY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是视图类型:true-是,false-否
|
* 是否是视图类型:true-是,false-否
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
*/
|
*/
|
||||||
package cn.stylefeng.roses.kernel.scanner.api.annotation;
|
package cn.stylefeng.roses.kernel.scanner.api.annotation;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum;
|
import cn.stylefeng.roses.kernel.rule.enums.ResBizTypeEnum;
|
||||||
import org.springframework.core.annotation.AliasFor;
|
import org.springframework.core.annotation.AliasFor;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -64,19 +65,23 @@ public @interface PostResource {
|
||||||
String name() default "";
|
String name() default "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是菜单(true-是菜单标识,false-不是菜单标识)
|
* 当前接口是否需要登录(true-需要登录,false-不需要登录)
|
||||||
*/
|
|
||||||
boolean menuFlag() default false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 需要登录(true-需要登录,false-不需要登录)
|
|
||||||
*/
|
*/
|
||||||
boolean requiredLogin() default true;
|
boolean requiredLogin() default true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需要鉴权(true-需要鉴权,false-不需要鉴权)
|
* 当前接口是否需要鉴权(true-需要鉴权,false-不需要鉴权)
|
||||||
|
* <p>
|
||||||
|
* 【7.6.0】修改,默认改为false不需要权限校验
|
||||||
*/
|
*/
|
||||||
boolean requiredPermission() default true;
|
boolean requiredPermission() default false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前接口需要的权限标识(菜单的编码或者菜单功能的编码,从sys_menu表或者sys_menu_options表查询)
|
||||||
|
* <p>
|
||||||
|
* 如果requiredPermission = true,则需要填写此编码
|
||||||
|
*/
|
||||||
|
String requirePermissionCode() default StrUtil.EMPTY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否需要请求解密,响应加密 (true-需要,false-不需要)
|
* 是否需要请求解密,响应加密 (true-需要,false-不需要)
|
||||||
|
|
Loading…
Reference in New Issue