注释类型 Secured


  • @Retention(RUNTIME)
    public @interface Secured
    Annotation indicating that the annotated request should be authorized.
    从以下版本开始:
    1.2.0
    作者:
    nkorange, mai.jh
    • 可选元素概要

      可选元素 
      修饰符和类型 可选元素 说明
      com.alibaba.nacos.plugin.auth.constant.ActionTypes action
      The action type of the request.
      java.lang.Class<? extends ResourceParser> parser
      Custom resource parser.
      java.lang.String resource
      The name of resource related to the request.
      java.lang.String signType
      The module of resource related to the request.
      java.lang.String[] tags
      Specified tags for this secured, these tags will be injected into Resource as the keys and values of properties.
    • 元素详细资料

      • action

        com.alibaba.nacos.plugin.auth.constant.ActionTypes action
        The action type of the request.
        返回:
        action type, default READ
        默认值:
        com.alibaba.nacos.plugin.auth.constant.ActionTypes.READ
      • resource

        java.lang.String resource
        The name of resource related to the request.
        返回:
        resource name
        默认值:
        ""
      • signType

        java.lang.String signType
        The module of resource related to the request.
        返回:
        module name
        默认值:
        "naming"
      • parser

        java.lang.Class<? extends ResourceParser> parser
        Custom resource parser. Should have lower priority than resource() and typed parser.
        返回:
        class type of resource parser
        默认值:
        com.alibaba.nacos.auth.parser.DefaultResourceParser.class
      • tags

        java.lang.String[] tags
        Specified tags for this secured, these tags will be injected into Resource as the keys and values of properties.
        返回:
        tags
        默认值:
        {}