Explorar o código

新增IP权限属性

zh.sqy %!s(int64=9) %!d(string=hai) anos
pai
achega
8f60be8c58

+ 6 - 0
hsweb-web-core/src/main/java/org/hsweb/web/authorize/annotation/Authorize.java

@@ -47,6 +47,12 @@ public @interface Authorize {
      */
     String expressionLanguage() default "spel";
 
+    /**
+     * 根据ip地址进行权限控制,支持ip段如:  192.168.1.*; 192.168.2.1-10;192.168.2-5.1-10
+     * @return ip表
+     */
+    String[] ip() default {};
+
     /**
      * 是否为api接口,为true时,不使用用户登录策略。
      *