public abstract class AbstractBaseControl extends CallbackController
| 构造器和说明 |
|---|
AbstractBaseControl() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
getCookieValue(String name) |
protected String |
getHeader(String name) |
protected String |
getIp()
获取请求的ip 地址
|
static String |
getIpAddress(javax.servlet.http.HttpServletRequest request)
获取ip 地址
|
protected <T> T |
getObject(Class<T> tClass)
获取表单数据到实体中
|
protected String |
getParameter(String name) |
protected String |
getParameter(String name,
String def)
获取指定参数名的值
|
protected int |
getParameterInt(String name) |
protected int |
getParameterInt(String name,
int def) |
protected long |
getParameterLong(String name) |
protected long |
getParameterLong(String name,
long def) |
protected String[] |
getParameters(String name) |
protected Map<String,String> |
getRefererParameter()
获取来源的url 参数
|
void |
resetInfo()
拦截器注入
|
getAttribute, getRequest, getRequestAttributes, getResponse, getSession, getSessionAttribute, getSessionAttributeObj, removeSessionAttribute, setAttribute, setSessionAttributepublic void resetInfo()
resetInfo 在类中 CallbackControllerprotected String getIp()
protected String getParameter(String name, String def)
name - 参数名def - 默认值protected int getParameterInt(String name, int def)
protected int getParameterInt(String name)
protected long getParameterLong(String name, long def)
protected long getParameterLong(String name)
protected Map<String,String> getRefererParameter() throws UnsupportedEncodingException
UnsupportedEncodingException - 编码异常protected <T> T getObject(Class<T> tClass) throws IllegalAccessException, InstantiationException
T - ttClass - classIllegalAccessException - yInstantiationException - ypublic static String getIpAddress(javax.servlet.http.HttpServletRequest request)
request - reqCopyright © 2017–2018 Pivotal Software, Inc.. All rights reserved.