formparam注释的功能是什么?

时间:2017-11-24 07:26:14

标签: java annotations

我有以下代码:

public class RequestBaseFormParamTO extends BaseFormParamTO {
    @FormParam("channelId")
    private String channelId;
    @FormParam("signatureString")
    private String signatureString;

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getSignatureString() {
        return signatureString;
    }

    public void setSignatureString(String signatureString) {
        this.signatureString = signatureString;
    }

}

@FormParam注释的功能是什么,我知道@FormParam用于从html获取值,但在这种情况下,表单参数不会放在服务中。那么,功能是什么?我想在这段代码中理解。感谢

这是另一个代码类:

    public class BaseFormParamTO {
        @FormParam("transactionId")
        private String transactionId;
        @FormParam("transactionTime")
        private String transactionTime;

        public String getTransactionId() {
            return transactionId;
        }

        public void setTransactionId(String transactionId) {
            this.transactionId = transactionId;
        }

        public String getTransactionTime() {
            return transactionTime;
        }

        public void setTransactionTime(String transactionTime) {
            this.transactionTime = transactionTime;
        }
    }

0 个答案:

没有答案