目录
一、创建地址:
1、ApiConstant类中创建
首先在ApiConstant类中创建路由地址,命名尽量全部大写,例如:
public final class ApiConstant {
private ApiConstant(){}
public static final String API_PRODUCES="application/json";
public static final String ROUTE_AUTH_ROOT="api/v1";
public static final String ROUTE_AUTH_LOGIN="/login";
public static final String ROUTE_AUTH_EXISTS="/exists/{user}";
public static final String ROUTE_AUTH_REGISTER="/register";
public static final String ROUTE_UPLOAD="/upload";
public static final String ROUTE_USER_ROOT="api/v1/admin";
public static final String ROUTE_USER_ALL="/";
public static final String ROUTE_USER_PAGE="/page";
public static final String ROUTE_USER_SEARCH="/search/{kw}";
public static final String ROUTE_USER_APPLY="/apply";
public static final String ROUTE_USER_APPROVE="/approve";
public static final String ROUTE_USER_DECLINE="/decline";
public static final String ROUTE_USER_BAN="/ban";
public static final String ROUTE_COURSE_ROOT="api