org.jeecg.common.util.SpringContextUtils Java Examples

The following examples show how to use org.jeecg.common.util.SpringContextUtils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JwtUtil.java    From teaching with Apache License 2.0 6 votes vote down vote up
/**
  *  从session中获取变量
 * @param key
 * @return
 */
public static String getSessionData(String key) {
	//${myVar}%
	//得到${} 后面的值
	String moshi = "";
	if(key.indexOf("}")!=-1){
		 moshi = key.substring(key.indexOf("}")+1);
	}
	String returnValue = null;
	if (key.contains("#{")) {
		key = key.substring(2,key.indexOf("}"));
	}
	if (oConvertUtils.isNotEmpty(key)) {
		HttpSession session = SpringContextUtils.getHttpServletRequest().getSession();
		returnValue = (String) session.getAttribute(key);
	}
	//结果加上${} 后面的值
	if(returnValue!=null){returnValue = returnValue + moshi;}
	return returnValue;
}
 
Example #2
Source File: JwtUtil.java    From jeecg-boot with Apache License 2.0 6 votes vote down vote up
/**
  *  从session中获取变量
 * @param key
 * @return
 */
public static String getSessionData(String key) {
	//${myVar}%
	//得到${} 后面的值
	String moshi = "";
	if(key.indexOf("}")!=-1){
		 moshi = key.substring(key.indexOf("}")+1);
	}
	String returnValue = null;
	if (key.contains("#{")) {
		key = key.substring(2,key.indexOf("}"));
	}
	if (oConvertUtils.isNotEmpty(key)) {
		HttpSession session = SpringContextUtils.getHttpServletRequest().getSession();
		returnValue = (String) session.getAttribute(key);
	}
	//结果加上${} 后面的值
	if(returnValue!=null){returnValue = returnValue + moshi;}
	return returnValue;
}
 
Example #3
Source File: JwtUtil.java    From jeecg-cloud with Apache License 2.0 6 votes vote down vote up
/**
 * 根据request中的token获取用户信息
 *
 * @return
 * @throws JeecgBootException
 */
public static LoginUser getLoginUser() throws JeecgBootException {
	HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
	if(request==null){
		log.warn(" 非request方式访问!! ");
		return null;
	}
	String accessToken = request.getHeader("X-Access-Token");
	if(oConvertUtils.isEmpty(accessToken)){
		return null;
	}
	String username = getUsername(accessToken);
	if (oConvertUtils.isEmpty(username)) {
		throw new JeecgBootException("未获取到用户");
	}
	RedisUtil redisUtil = SpringContextUtils.getApplicationContext().getBean(RedisUtil.class);
	LoginUser sysUser = (LoginUser) redisUtil.get(CacheConstant.SYS_USERS_CACHE_JWT +":" +username);
	return sysUser;
}
 
Example #4
Source File: JwtUtil.java    From jeecg-cloud with Apache License 2.0 6 votes vote down vote up
/**
  *  从session中获取变量
 * @param key
 * @return
 */
public static String getSessionData(String key) {
	//${myVar}%
	//得到${} 后面的值
	String moshi = "";
	if(key.indexOf("}")!=-1){
		 moshi = key.substring(key.indexOf("}")+1);
	}
	String returnValue = null;
	if (key.contains("#{")) {
		key = key.substring(2,key.indexOf("}"));
	}
	if (oConvertUtils.isNotEmpty(key)) {
		HttpSession session = SpringContextUtils.getHttpServletRequest().getSession();
		returnValue = (String) session.getAttribute(key);
	}
	//结果加上${} 后面的值
	if(returnValue!=null){returnValue = returnValue + moshi;}
	return returnValue;
}
 
Example #5
Source File: JwtUtil.java    From jeecg-boot-with-activiti with MIT License 6 votes vote down vote up
/**
  *  从session中获取变量
 * @param key
 * @return
 */
public static String getSessionData(String key) {
	//${myVar}%
	//得到${} 后面的值
	String moshi = "";
	if(key.indexOf("}")!=-1){
		 moshi = key.substring(key.indexOf("}")+1);
	}
	String returnValue = null;
	if (key.contains("#{")) {
		key = key.substring(2,key.indexOf("}"));
	}
	if (oConvertUtils.isNotEmpty(key)) {
		HttpSession session = SpringContextUtils.getHttpServletRequest().getSession();
		returnValue = (String) session.getAttribute(key);
	}
	//结果加上${} 后面的值
	if(returnValue!=null){returnValue = returnValue + moshi;}
	return returnValue;
}
 
Example #6
Source File: PermissionDataAspect.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
@Around("pointCut()")
public Object arround(ProceedingJoinPoint point) throws  Throwable{
	HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
	MethodSignature signature = (MethodSignature) point.getSignature();
	Method method = signature.getMethod();
	PermissionData pd = method.getAnnotation(PermissionData.class);
	String component = pd.pageComponent();
	authDataHandler(request, component);
	return  point.proceed();
}
 
Example #7
Source File: DataSourceCachePool.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
 * 获取多数据源缓存
 *
 * @param dbKey
 * @return
 */
public static DynamicDataSourceModel getCacheDynamicDataSourceModel(String dbKey) {
    DynamicDataSourceModel dbSource = dynamicDbSourcesCache.get(dbKey);
    if (dbSource == null) {
        ISysBaseAPI sysBaseAPI = SpringContextUtils.getBean(ISysBaseAPI.class);
        dbSource = sysBaseAPI.getDynamicDbSourceByCode(dbKey);
        dynamicDbSourcesCache.put(dbKey, dbSource);
        dynamicDbSourcesIdToCode.put(dbSource.getId(), dbKey);
    }
    return dbSource;
}
 
Example #8
Source File: ShiroRealm.java    From teaching with Apache License 2.0 5 votes vote down vote up
/**
    * 用户信息认证是在用户进行登录的时候进行验证(不存redis)
 * 也就是说验证用户输入的账号和密码是否正确,错误抛出异常
 *
 * @param auth 用户登录的账号密码信息
 * @return 返回封装了用户信息的 AuthenticationInfo 实例
    * @throws AuthenticationException
 */
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
	String token = (String) auth.getCredentials();
	if (token == null) {
		log.info("————————身份认证失败——————————IP地址:  "+ oConvertUtils.getIpAddrByRequest(SpringContextUtils.getHttpServletRequest()));
		throw new AuthenticationException("token为空!");
	}
	// 校验token有效性
	LoginUser loginUser = this.checkUserTokenIsEffect(token);
	return new SimpleAuthenticationInfo(loginUser, token, getName());
}
 
Example #9
Source File: SysBaseApiImpl.java    From teaching with Apache License 2.0 5 votes vote down vote up
@Override
public void addLog(String LogContent, Integer logType, Integer operatetype) {
	SysLog sysLog = new SysLog();
	//注解上的描述,操作日志内容
	sysLog.setLogContent(LogContent);
	sysLog.setLogType(logType);
	sysLog.setOperateType(operatetype);

	//请求的方法名
	//请求的参数

	try {
		//获取request
		HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
		//设置IP地址
		sysLog.setIp(IPUtils.getIpAddr(request));
	} catch (Exception e) {
		sysLog.setIp("127.0.0.1");
	}

	//获取登录用户信息
	LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
	if(sysUser!=null){
		sysLog.setUserid(sysUser.getUsername());
		sysLog.setUsername(sysUser.getRealname());

	}
	sysLog.setCreateTime(new Date());
	//保存系统日志
	sysLogMapper.insert(sysLog);
}
 
Example #10
Source File: SysBaseApiImpl.java    From jeecg-boot-with-activiti with MIT License 5 votes vote down vote up
@Override
public void addLog(String LogContent, Integer logType, Integer operatetype) {
	SysLog sysLog = new SysLog();
	//注解上的描述,操作日志内容
	sysLog.setLogContent(LogContent);
	sysLog.setLogType(logType);
	sysLog.setOperateType(operatetype);

	//请求的方法名
	//请求的参数

	try {
		//获取request
		HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
		//设置IP地址
		sysLog.setIp(IPUtils.getIpAddr(request));
	} catch (Exception e) {
		sysLog.setIp("127.0.0.1");
	}

	//获取登录用户信息
	LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
	if(sysUser!=null){
		sysLog.setUserid(sysUser.getUsername());
		sysLog.setUsername(sysUser.getRealname());

	}
	sysLog.setCreateTime(new Date());
	//保存系统日志
	sysLogMapper.insert(sysLog);
}
 
Example #11
Source File: ShiroRealm.java    From jeecg-boot-with-activiti with MIT License 5 votes vote down vote up
/**
    * 用户信息认证是在用户进行登录的时候进行验证(不存redis)
 * 也就是说验证用户输入的账号和密码是否正确,错误抛出异常
 *
 * @param auth 用户登录的账号密码信息
 * @return 返回封装了用户信息的 AuthenticationInfo 实例
    * @throws AuthenticationException
 */
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
	String token = (String) auth.getCredentials();
	if (token == null) {
		log.info("————————身份认证失败——————————IP地址:  "+ oConvertUtils.getIpAddrByRequest(SpringContextUtils.getHttpServletRequest()));
		throw new AuthenticationException("token为空!");
	}
	// 校验token有效性
	LoginUser loginUser = this.checkUserTokenIsEffect(token);
	return new SimpleAuthenticationInfo(loginUser, token, getName());
}
 
Example #12
Source File: EmailSendMsgHandle.java    From jeecg-boot-with-activiti with MIT License 5 votes vote down vote up
@Override
public void SendMsg(String es_receiver, String es_title, String es_content) {
	JavaMailSender mailSender = (JavaMailSender) SpringContextUtils.getBean("mailSender");
	SimpleMailMessage message = new SimpleMailMessage();
	// 设置发送方邮箱地址
	message.setFrom(emailFrom);
	message.setTo(es_receiver);
	message.setSubject(es_title);
	message.setText(es_content);
	mailSender.send(message);

}
 
Example #13
Source File: DataSourceCachePool.java    From jeecg-boot with Apache License 2.0 5 votes vote down vote up
/**
 * 获取多数据源缓存
 *
 * @param dbKey
 * @return
 */
public static DynamicDataSourceModel getCacheDynamicDataSourceModel(String dbKey) {
    String redisCacheKey = CacheConstant.SYS_DYNAMICDB_CACHE + dbKey;
    if (getRedisTemplate().hasKey(redisCacheKey)) {
        return (DynamicDataSourceModel) getRedisTemplate().opsForValue().get(redisCacheKey);
    }
    ISysBaseAPI sysBaseAPI = SpringContextUtils.getBean(ISysBaseAPI.class);
    DynamicDataSourceModel dbSource = sysBaseAPI.getDynamicDbSourceByCode(dbKey);
    if (dbSource != null) {
        getRedisTemplate().opsForValue().set(redisCacheKey, dbSource);
    }
    return dbSource;
}
 
Example #14
Source File: DataSourceCachePool.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
/**
 * 获取多数据源缓存
 *
 * @param dbKey
 * @return
 */
public static DynamicDataSourceModel getCacheDynamicDataSourceModel(String dbKey) {
    String redisCacheKey = CacheConstant.SYS_DYNAMICDB_CACHE + dbKey;
    if (getRedisTemplate().hasKey(redisCacheKey)) {
        return (DynamicDataSourceModel) getRedisTemplate().opsForValue().get(redisCacheKey);
    }
    ISysBaseAPI sysBaseAPI = SpringContextUtils.getBean(ISysBaseAPI.class);
    DynamicDataSourceModel dbSource = sysBaseAPI.getDynamicDbSourceByCode(dbKey);
    if (dbSource != null) {
        getRedisTemplate().opsForValue().set(redisCacheKey, dbSource);
    }
    return dbSource;
}
 
Example #15
Source File: ShiroRealm.java    From jeecg-boot with Apache License 2.0 5 votes vote down vote up
/**
    * 用户信息认证是在用户进行登录的时候进行验证(不存redis)
 * 也就是说验证用户输入的账号和密码是否正确,错误抛出异常
 *
 * @param auth 用户登录的账号密码信息
 * @return 返回封装了用户信息的 AuthenticationInfo 实例
    * @throws AuthenticationException
 */
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
	String token = (String) auth.getCredentials();
	if (token == null) {
		log.info("————————身份认证失败——————————IP地址:  "+ oConvertUtils.getIpAddrByRequest(SpringContextUtils.getHttpServletRequest()));
		throw new AuthenticationException("token为空!");
	}
	// 校验token有效性
	LoginUser loginUser = this.checkUserTokenIsEffect(token);
	return new SimpleAuthenticationInfo(loginUser, token, getName());
}
 
Example #16
Source File: ShiroRealm.java    From jeecg-cloud with Apache License 2.0 5 votes vote down vote up
/**
    * 用户信息认证是在用户进行登录的时候进行验证(不存redis)
 * 也就是说验证用户输入的账号和密码是否正确,错误抛出异常
 *
 * @param auth 用户登录的账号密码信息
 * @return 返回封装了用户信息的 AuthenticationInfo 实例
    * @throws AuthenticationException
 */
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken auth) throws AuthenticationException {
	String token = (String) auth.getCredentials();
	if (token == null) {
		log.info("————————身份认证失败——————————IP地址:  "+ oConvertUtils.getIpAddrByRequest(SpringContextUtils.getHttpServletRequest()));
		throw new AuthenticationException("token为空!");
	}
	// 校验token有效性
	LoginUser loginUser = this.checkUserTokenIsEffect(token);
	return new SimpleAuthenticationInfo(loginUser, token, getName());
}
 
Example #17
Source File: SysBaseApiImpl.java    From teaching with Apache License 2.0 4 votes vote down vote up
@Override
public String getDatabaseType() throws SQLException {
	DataSource dataSource = SpringContextUtils.getApplicationContext().getBean(DataSource.class);
	return getDatabaseTypeByDataSource(dataSource);
}
 
Example #18
Source File: AutoLogAspect.java    From teaching with Apache License 2.0 4 votes vote down vote up
private void saveSysLog(ProceedingJoinPoint joinPoint, long time) {
	MethodSignature signature = (MethodSignature) joinPoint.getSignature();
	Method method = signature.getMethod();

	SysLog sysLog = new SysLog();
	AutoLog syslog = method.getAnnotation(AutoLog.class);
	if(syslog != null){
		//注解上的描述,操作日志内容
		sysLog.setLogContent(syslog.value());
		sysLog.setLogType(syslog.logType());
		
	}

	//请求的方法名
	String className = joinPoint.getTarget().getClass().getName();
	String methodName = signature.getName();
	sysLog.setMethod(className + "." + methodName + "()");
	
	
	//设置操作类型
	if (sysLog.getLogType() == CommonConstant.LOG_TYPE_2) {
		sysLog.setOperateType(getOperateType(methodName, syslog.operateType()));
	}

	//请求的参数
	Object[] args = joinPoint.getArgs();
	try{
		String params = JSONObject.toJSONString(args);
		sysLog.setRequestParam(params);
	}catch (Exception e){

	}

	//获取request
	HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
	//设置IP地址
	sysLog.setIp(IPUtils.getIpAddr(request));

	//获取登录用户信息
	LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
	if(sysUser!=null){
		sysLog.setUserid(sysUser.getUsername());
		sysLog.setUsername(sysUser.getRealname());

	}
	//耗时
	sysLog.setCostTime(time);
	sysLog.setCreateTime(new Date());
	//保存系统日志
	sysLogService.save(sysLog);
}
 
Example #19
Source File: DataSourceCachePool.java    From jeecg-boot with Apache License 2.0 4 votes vote down vote up
private static RedisTemplate<String, Object> getRedisTemplate() {
    if (redisTemplate == null) {
        redisTemplate = (RedisTemplate<String, Object>) SpringContextUtils.getBean("redisTemplate");
    }
    return redisTemplate;
}
 
Example #20
Source File: JeecgDataAutorUtils.java    From jeecg-boot with Apache License 2.0 4 votes vote down vote up
/**
 * 获取请求对应的数据权限规则
 * 
 * @return
 */
@SuppressWarnings("unchecked")
public static synchronized List<SysPermissionDataRuleModel> loadDataSearchConditon() {
	return (List<SysPermissionDataRuleModel>) SpringContextUtils.getHttpServletRequest().getAttribute(MENU_DATA_AUTHOR_RULES);
			
}
 
Example #21
Source File: AutoLogAspect.java    From jeecg-boot with Apache License 2.0 4 votes vote down vote up
private void saveSysLog(ProceedingJoinPoint joinPoint, long time) {
	MethodSignature signature = (MethodSignature) joinPoint.getSignature();
	Method method = signature.getMethod();

	SysLog sysLog = new SysLog();
	AutoLog syslog = method.getAnnotation(AutoLog.class);
	if(syslog != null){
		//注解上的描述,操作日志内容
		sysLog.setLogContent(syslog.value());
		sysLog.setLogType(syslog.logType());
		
	}

	//请求的方法名
	String className = joinPoint.getTarget().getClass().getName();
	String methodName = signature.getName();
	sysLog.setMethod(className + "." + methodName + "()");
	
	
	//设置操作类型
	if (sysLog.getLogType() == CommonConstant.LOG_TYPE_2) {
		sysLog.setOperateType(getOperateType(methodName, syslog.operateType()));
	}

	//获取request
	HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
	//请求的参数
	sysLog.setRequestParam(getReqestParams(request,joinPoint));

	//设置IP地址
	sysLog.setIp(IPUtils.getIpAddr(request));

	//获取登录用户信息
	LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
	if(sysUser!=null){
		sysLog.setUserid(sysUser.getUsername());
		sysLog.setUsername(sysUser.getRealname());

	}
	//耗时
	sysLog.setCostTime(time);
	sysLog.setCreateTime(new Date());
	//保存系统日志
	sysLogService.save(sysLog);
}
 
Example #22
Source File: JeecgDataAutorUtils.java    From teaching with Apache License 2.0 4 votes vote down vote up
/**
 * 获取请求对应的数据权限规则
 * 
 * @return
 */
@SuppressWarnings("unchecked")
public static synchronized List<SysPermissionDataRuleModel> loadDataSearchConditon() {
	return (List<SysPermissionDataRuleModel>) SpringContextUtils.getHttpServletRequest().getAttribute(MENU_DATA_AUTHOR_RULES);
			
}
 
Example #23
Source File: AutoLogAspect.java    From jeecg-boot-with-activiti with MIT License 4 votes vote down vote up
private void saveSysLog(ProceedingJoinPoint joinPoint, long time) {
	MethodSignature signature = (MethodSignature) joinPoint.getSignature();
	Method method = signature.getMethod();

	SysLog sysLog = new SysLog();
	AutoLog syslog = method.getAnnotation(AutoLog.class);
	if(syslog != null){
		//注解上的描述,操作日志内容
		sysLog.setLogContent(syslog.value());
		sysLog.setLogType(syslog.logType());
		
	}

	//请求的方法名
	String className = joinPoint.getTarget().getClass().getName();
	String methodName = signature.getName();
	sysLog.setMethod(className + "." + methodName + "()");
	
	
	//设置操作类型
	if (sysLog.getLogType() == CommonConstant.LOG_TYPE_2) {
		sysLog.setOperateType(getOperateType(methodName, syslog.operateType()));
	}

	//请求的参数
	Object[] args = joinPoint.getArgs();
	try{
		String params = JSONObject.toJSONString(args);
		sysLog.setRequestParam(params);
	}catch (Exception e){

	}

	//获取request
	HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
	//设置IP地址
	sysLog.setIp(IPUtils.getIpAddr(request));

	//获取登录用户信息
	LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
	if(sysUser!=null){
		sysLog.setUserid(sysUser.getUsername());
		sysLog.setUsername(sysUser.getRealname());

	}
	//耗时
	sysLog.setCostTime(time);
	sysLog.setCreateTime(new Date());
	//保存系统日志
	sysLogService.save(sysLog);
}
 
Example #24
Source File: SysBaseApiImpl.java    From jeecg-boot-with-activiti with MIT License 4 votes vote down vote up
@Override
public String getDatabaseType() throws SQLException {
	DataSource dataSource = SpringContextUtils.getApplicationContext().getBean(DataSource.class);
	return getDatabaseTypeByDataSource(dataSource);
}
 
Example #25
Source File: JeecgDataAutorUtils.java    From jeecg-cloud with Apache License 2.0 4 votes vote down vote up
/**
 * 获取请求对应的数据权限规则
 * 
 * @return
 */
@SuppressWarnings("unchecked")
public static synchronized List<SysPermissionDataRuleModel> loadDataSearchConditon() {
	return (List<SysPermissionDataRuleModel>) SpringContextUtils.getHttpServletRequest().getAttribute(MENU_DATA_AUTHOR_RULES);
			
}
 
Example #26
Source File: DataSourceCachePool.java    From jeecg-cloud with Apache License 2.0 4 votes vote down vote up
private static RedisTemplate<String, Object> getRedisTemplate() {
    if (redisTemplate == null) {
        redisTemplate = (RedisTemplate<String, Object>) SpringContextUtils.getBean("redisTemplate");
    }
    return redisTemplate;
}
 
Example #27
Source File: AutoLogAspect.java    From jeecg-cloud with Apache License 2.0 4 votes vote down vote up
private void saveSysLog(ProceedingJoinPoint joinPoint, long time) {
	MethodSignature signature = (MethodSignature) joinPoint.getSignature();
	Method method = signature.getMethod();

	SysLog sysLog = new SysLog();
	AutoLog syslog = method.getAnnotation(AutoLog.class);
	if(syslog != null){
		//注解上的描述,操作日志内容
		sysLog.setLogContent(syslog.value());
		sysLog.setLogType(syslog.logType());

	}

	//请求的方法名
	String className = joinPoint.getTarget().getClass().getName();
	String methodName = signature.getName();
	sysLog.setMethod(className + "." + methodName + "()");


	//设置操作类型
	if (sysLog.getLogType() == CommonConstant.LOG_TYPE_2) {
		sysLog.setOperateType(getOperateType(methodName, syslog.operateType()));
	}

	//获取request
	HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
	//请求的参数
	sysLog.setRequestParam(getReqestParams(request,joinPoint));

	//设置IP地址
	sysLog.setIp(IPUtils.getIpAddr(request));

	//获取登录用户信息
	LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
	if(sysUser!=null){
		sysLog.setUserid(sysUser.getUsername());
		sysLog.setUsername(sysUser.getRealname());

	}
	//耗时
	sysLog.setCostTime(time);
	sysLog.setCreateTime(new Date());
	//保存系统日志
	JSONObject jsonObject = (JSONObject) JSONObject.toJSON(sysLog);
	sysBaseRemoteApi.saveSysLog(jsonObject);
}
 
Example #28
Source File: JeecgDataAutorUtils.java    From teaching with Apache License 2.0 2 votes vote down vote up
/**
 * 获取请求对应的数据权限SQL
 * 
 * @return
 */
public static synchronized String loadDataSearchConditonSQLString() {
	return (String) SpringContextUtils.getHttpServletRequest().getAttribute(MENU_DATA_AUTHOR_RULE_SQL);
}
 
Example #29
Source File: JeecgDataAutorUtils.java    From teaching with Apache License 2.0 2 votes vote down vote up
public static synchronized SysUserCacheInfo loadUserInfo() {
	return (SysUserCacheInfo) SpringContextUtils.getHttpServletRequest().getAttribute(SYS_USER_INFO);
			
}
 
Example #30
Source File: JeecgDataAutorUtils.java    From jeecg-boot-with-activiti with MIT License 2 votes vote down vote up
public static synchronized SysUserCacheInfo loadUserInfo() {
	return (SysUserCacheInfo) SpringContextUtils.getHttpServletRequest().getAttribute(SYS_USER_INFO);
			
}