public class SuperController extends Object
Controller 基础类(支持 kisso)
| 限定符和类型 | 字段和说明 |
|---|---|
protected javax.servlet.ServletContext |
application |
protected org.slf4j.Logger |
logger |
protected javax.servlet.http.HttpServletRequest |
request |
protected javax.servlet.http.HttpServletResponse |
response |
protected javax.servlet.http.HttpSession |
session |
| 构造器和说明 |
|---|
SuperController() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
callback(AjaxResult object)
自动判定是否有跨域操作,转成字符串并返回
|
protected String |
callback(AjaxResult object,
String format) |
protected String |
callbackFail(String message) |
protected String |
callbackSuccess(Object obj) |
protected Long |
getCurrentUserId()
用户ID
|
protected <T> com.baomidou.mybatisplus.plugins.Page<T> |
getPage()
获取分页对象
|
protected <T> com.baomidou.mybatisplus.plugins.Page<T> |
getPage(int size)
获取分页对象
|
protected com.baomidou.kisso.SSOToken |
getSSOToken()
返回登录 Token
|
protected boolean |
isGet()
是否为 get 请求
|
protected boolean |
isPost()
是否为 post 请求
|
protected String |
redirectTo(String url)
重定向至地址 url
|
protected String |
toJson(Object object)
返回 JSON 格式对象
|
protected String |
toJson(Object object,
String format)
返回 JSON 格式对象
|
protected org.slf4j.Logger logger
@Autowired protected javax.servlet.http.HttpServletRequest request
@Autowired protected javax.servlet.http.HttpServletResponse response
@Autowired protected javax.servlet.http.HttpSession session
@Autowired protected javax.servlet.ServletContext application
protected Long getCurrentUserId()
protected com.baomidou.kisso.SSOToken getSSOToken()
protected boolean isPost()
protected boolean isGet()
protected <T> com.baomidou.mybatisplus.plugins.Page<T> getPage()
获取分页对象
protected <T> com.baomidou.mybatisplus.plugins.Page<T> getPage(int size)
获取分页对象
size - 每页显示数量protected String toJson(Object object, String format)
object - 转换对象features - 序列化特点protected String callback(AjaxResult object)
自动判定是否有跨域操作,转成字符串并返回
object - protected String callback(AjaxResult object, String format)
Copyright © 2016. All rights reserved.