From f39773dc36e3eccf57c329498e91864e1c9be7f8 Mon Sep 17 00:00:00 2001 From: JeffLi1993 Date: Tue, 14 Mar 2017 17:50:25 +0800 Subject: [PATCH] =?UTF-8?q?Spring=20Boot=20HTTP=20over=20JSON=20=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/spring/springboot/web/City.java | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 springboot-validation-over-json/src/main/java/org/spring/springboot/web/City.java diff --git a/springboot-validation-over-json/src/main/java/org/spring/springboot/web/City.java b/springboot-validation-over-json/src/main/java/org/spring/springboot/web/City.java new file mode 100644 index 0000000..27f2cf2 --- /dev/null +++ b/springboot-validation-over-json/src/main/java/org/spring/springboot/web/City.java @@ -0,0 +1,75 @@ +package org.spring.springboot.web; + +import java.io.Serializable; + +/** + * 城市实体类 + * + * Created by bysocket on 07/02/2017. + */ +public class City implements Serializable { + + private static final long serialVersionUID = -1L; + + /** + * 城市编号 + */ + private Long id; + + /** + * 省份编号 + */ + private Long provinceId; + + /** + * 城市名称 + */ + private String cityName; + + /** + * 描述 + */ + private String description; + + public City() { + } + + public City(Long id, Long provinceId, String cityName, String description) { + this.id = id; + this.provinceId = provinceId; + this.cityName = cityName; + this.description = description; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProvinceId() { + return provinceId; + } + + public void setProvinceId(Long provinceId) { + this.provinceId = provinceId; + } + + public String getCityName() { + return cityName; + } + + public void setCityName(String cityName) { + this.cityName = cityName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +}