mirror of
https://github.com/JeffLi1993/springboot-learning-example.git
synced 2026-03-13 21:43:45 +08:00
Spring Boot HTTP over JSON 的错误码异常处理
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user