mirror of
https://github.com/yzcheng90/X-SpringBoot
synced 2025-11-07 16:42:04 +08:00
update version to 2.0
更新版本到2.0 使用最新springboot 2.1.3 RELEASE版本及其他库升级到最新版本 大量重构了代码,减少一些第三方依赖。
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.suke.czx.common.base;
|
||||
|
||||
import com.suke.czx.common.utils.MPPageConvert;
|
||||
import com.suke.czx.modules.sys.entity.SysUser;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* Controller公共组件
|
||||
*
|
||||
* @author czx
|
||||
* @email object_czx@163.com
|
||||
* @date 2016年11月9日 下午9:42:26
|
||||
*/
|
||||
|
||||
public abstract class AbstractController {
|
||||
@Autowired
|
||||
protected MPPageConvert mpPageConvert;
|
||||
|
||||
protected SysUser getUser() {
|
||||
return (SysUser) SecurityUtils.getSubject().getPrincipal();
|
||||
}
|
||||
|
||||
protected Long getUserId() {
|
||||
return getUser().getUserId();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user