public abstract class AbstractBaseControl extends BaseCallbackController
| 构造器和说明 |
|---|
AbstractBaseControl() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
clearResources()
释放资源
|
protected String |
getCookieValue(String name) |
protected org.springframework.web.multipart.MultipartFile |
getFile(String name) |
protected List<org.springframework.web.multipart.MultipartFile> |
getFiles(String name) |
protected String |
getHeader(String name) |
protected String |
getIp()
获取请求的ip 地址
|
protected org.springframework.web.multipart.MultipartHttpServletRequest |
getMultiRequest() |
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()
拦截器注入
|
protected String[] |
upload(String... name) |
protected String |
upload(String name)
接收文件
|
getAttribute, getRequest, getRequestAttributes, getResponse, getSession, getSessionAttribute, getSessionAttributeObj, removeSessionAttribute, setAttribute, setSessionAttribute, tryGetRequestAttributespublic void resetInfo()
resetInfo 在类中 BaseCallbackControllerprotected 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)
T - ttClass - classpublic static void clearResources()
protected org.springframework.web.multipart.MultipartHttpServletRequest getMultiRequest()
protected org.springframework.web.multipart.MultipartFile getFile(String name)
protected String upload(String name) throws IOException
name - 字段名称IOException - IOprotected String[] upload(String... name) throws IOException
IOExceptionCopyright © 2017–2018. All rights reserved.