zoukankan      html  css  js  c++  java
  • Java中request请求配置

    @Api("主键请求")
    public class IdRequest {
        @NotNull(message = "请检查参数,参数为空")
        private Integer id;
    
        public Integer getId() {
            return id;
        }
    
        public void setId(Integer id) {
            this.id = id;
        }
    }
    
    @Api("分页请求体")
    public class PageRequest {
    
        @ApiModelProperty("页码")
        @NotNull(message = "请求页码不能为空")
        @Min(value = 1,message = "请求页码不能小于1")
        private Integer page;
    
        @ApiModelProperty("页码大小")
        @NotNull(message = "请求页码大小不能为空")
        @Min(value = 1,message = "请求页码大小不能小于1")
        private Integer size;
    
        public Integer getPage() {
            return page;
        }
    
        public void setPage(Integer page) {
            this.page = page;
        }
    
        public Integer getSize() {
            return size;
        }
    
        public void setSize(Integer size) {
            this.size = size;
        }
    }
    

    java中把request的基本信息都封装了。有点意思。

  • 相关阅读:
    标准C语言(9)
    标准C语言(8)
    标准C语言(7)
    标准C语言(6)
    标准C语言(5)
    标准C语言(4)
    标准C语言(3)
    标准C语言(1)
    Linux基础
    Kafka 学习笔记之 Kafka0.11之console-producer/console-consumer
  • 原文地址:https://www.cnblogs.com/jiqing9006/p/14478599.html
Copyright © 2011-2022 走看看