1. 进一步封装 Redis pub/sub 的能力,简化编程难度

2. 数据字典的本地缓存刷新
pull/2/head
YunaiV 2021-01-23 10:56:34 +08:00
parent c10ab1753a
commit dc42f0f1bb
18 changed files with 232 additions and 35 deletions

View File

@ -1,6 +1,6 @@
package cn.iocoder.dashboard.framework.redis.config; package cn.iocoder.dashboard.framework.redis.config;
import cn.iocoder.dashboard.framework.redis.core.listener.AbstractMessageListener; import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener;
import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer; import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -35,7 +35,7 @@ public class RedisConfig {
@Bean @Bean
public RedisMessageListenerContainer redisMessageListenerContainer(RedisConnectionFactory factory, public RedisMessageListenerContainer redisMessageListenerContainer(RedisConnectionFactory factory,
List<AbstractMessageListener<?>> listeners) { List<AbstractChannelMessageListener<?>> listeners) {
// 创建 RedisMessageListenerContainer 对象 // 创建 RedisMessageListenerContainer 对象
RedisMessageListenerContainer container = new RedisMessageListenerContainer(); RedisMessageListenerContainer container = new RedisMessageListenerContainer();
// 设置 RedisConnection 工厂。 // 设置 RedisConnection 工厂。

View File

@ -1,7 +1,8 @@
package cn.iocoder.dashboard.framework.redis.core.listener; package cn.iocoder.dashboard.framework.redis.core.pubsub;
import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.dashboard.util.json.JSONUtils; import cn.iocoder.dashboard.util.json.JSONUtils;
import lombok.SneakyThrows;
import org.springframework.data.redis.connection.Message; import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener; import org.springframework.data.redis.connection.MessageListener;
import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl; import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl;
@ -15,15 +16,21 @@ import java.lang.reflect.Type;
* *
* @author * @author
*/ */
public abstract class AbstractMessageListener<T> implements MessageListener { public abstract class AbstractChannelMessageListener<T extends ChannelMessage> implements MessageListener {
/** /**
* *
*/ */
private final Class<T> messageType; private final Class<T> messageType;
/**
* Redis Channel
*/
private final String channel;
protected AbstractMessageListener() { @SneakyThrows
protected AbstractChannelMessageListener() {
this.messageType = getMessageClass(); this.messageType = getMessageClass();
this.channel = messageType.newInstance().getChannel();
} }
/** /**
@ -31,7 +38,9 @@ public abstract class AbstractMessageListener<T> implements MessageListener {
* *
* @return channel * @return channel
*/ */
public abstract String getChannel(); public final String getChannel() {
return channel;
}
@Override @Override
public final void onMessage(Message message, byte[] bytes) { public final void onMessage(Message message, byte[] bytes) {
@ -56,7 +65,7 @@ public abstract class AbstractMessageListener<T> implements MessageListener {
Class<?> targetClass = getClass(); Class<?> targetClass = getClass();
while (targetClass.getSuperclass() != null) { while (targetClass.getSuperclass() != null) {
// 如果不是 AbstractMessageListener 父类,继续向上查找 // 如果不是 AbstractMessageListener 父类,继续向上查找
if (targetClass.getSuperclass() != AbstractMessageListener.class) { if (targetClass.getSuperclass() != AbstractChannelMessageListener.class) {
targetClass = targetClass.getSuperclass(); targetClass = targetClass.getSuperclass();
continue; continue;
} }

View File

@ -0,0 +1,18 @@
package cn.iocoder.dashboard.framework.redis.core.pubsub;
import com.alibaba.fastjson.annotation.JSONField;
/**
* Redis Channel Message
*/
public interface ChannelMessage {
/**
* Redis Channel
*
* @return Channel
*/
@JSONField(serialize = false) // 必须序列化
String getChannel();
}

View File

@ -0,0 +1,24 @@
package cn.iocoder.dashboard.framework.redis.core.util;
import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage;
import cn.iocoder.dashboard.util.json.JSONUtils;
import org.springframework.data.redis.core.RedisTemplate;
/**
* Redis
*
* @author
*/
public class RedisMessageUtils {
/**
* Redis Redis pub/sub
*
* @param redisTemplate Redis
* @param message
*/
public static <T extends ChannelMessage> void sendChannelMessage(RedisTemplate<?, ?> redisTemplate, T message) {
redisTemplate.convertAndSend(message.getChannel(), JSONUtils.toJSONString(message));
}
}

View File

@ -63,7 +63,8 @@ public class SysAuthController {
// 获得角色列表 // 获得角色列表
List<SysRoleDO> roleList = roleService.listRolesFromCache(getLoginUserRoleIds()); List<SysRoleDO> roleList = roleService.listRolesFromCache(getLoginUserRoleIds());
// 获得菜单列表 // 获得菜单列表
List<SysMenuDO> menuList = permissionService.listRoleMenusFromCache(getLoginUserRoleIds(), List<SysMenuDO> menuList = permissionService.listRoleMenusFromCache(
getLoginUserRoleIds(), // 注意,基于登陆的角色,因为后续的权限判断也是基于它
SetUtils.asSet(MenuTypeEnum.DIR.getType(), MenuTypeEnum.MENU.getType(), MenuTypeEnum.BUTTON.getType()), SetUtils.asSet(MenuTypeEnum.DIR.getType(), MenuTypeEnum.MENU.getType(), MenuTypeEnum.BUTTON.getType()),
SetUtils.asSet(CommonStatusEnum.ENABLE.getStatus())); SetUtils.asSet(CommonStatusEnum.ENABLE.getStatus()));
// 拼接结果返回 // 拼接结果返回
@ -74,7 +75,8 @@ public class SysAuthController {
@GetMapping("list-menus") @GetMapping("list-menus")
public CommonResult<List<SysAuthMenuRespVO>> listMenus() { public CommonResult<List<SysAuthMenuRespVO>> listMenus() {
// 获得用户拥有的菜单列表 // 获得用户拥有的菜单列表
List<SysMenuDO> menuList = permissionService.listRoleMenusFromCache(getLoginUserRoleIds(), List<SysMenuDO> menuList = permissionService.listRoleMenusFromCache(
getLoginUserRoleIds(), // 注意,基于登陆的角色,因为后续的权限判断也是基于它
SetUtils.asSet(MenuTypeEnum.DIR.getType(), MenuTypeEnum.MENU.getType()), // 只要目录和菜单类型 SetUtils.asSet(MenuTypeEnum.DIR.getType(), MenuTypeEnum.MENU.getType()), // 只要目录和菜单类型
SetUtils.asSet(CommonStatusEnum.ENABLE.getStatus())); // 只要开启的 SetUtils.asSet(CommonStatusEnum.ENABLE.getStatus())); // 只要开启的
// 转换成 Tree 结构返回 // 转换成 Tree 结构返回

View File

@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.Date;
import java.util.List; import java.util.List;
import static com.baomidou.mybatisplus.core.metadata.OrderItem.asc; import static com.baomidou.mybatisplus.core.metadata.OrderItem.asc;
@ -42,4 +43,10 @@ public interface SysDictDataMapper extends BaseMapper<SysDictDataDO> {
.likeIfPresent("dict_type", reqVO.getDictType()) .likeIfPresent("dict_type", reqVO.getDictType())
.eqIfPresent("status", reqVO.getStatus())); .eqIfPresent("status", reqVO.getStatus()));
} }
default boolean selectExistsByUpdateTimeAfter(Date maxUpdateTime) {
return selectOne(new QueryWrapper<SysDictDataDO>().select("id")
.gt("update_time", maxUpdateTime).last("LIMIT 1")) != null;
}
} }

View File

@ -0,0 +1,29 @@
package cn.iocoder.dashboard.modules.system.mq.consumer.dict;
import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener;
import cn.iocoder.dashboard.modules.system.mq.message.dict.SysDictDataRefreshMessage;
import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* {@link SysDictDataRefreshMessage}
*
* @author
*/
@Component
@Slf4j
public class SysDictDataRefreshConsumer extends AbstractChannelMessageListener<SysDictDataRefreshMessage> {
@Resource
private SysDictDataService dictDataService;
@Override
public void onMessage(SysDictDataRefreshMessage message) {
log.info("[onMessage][收到 DictData 刷新消息]");
dictDataService.initLocalCache();
}
}

View File

@ -1,6 +1,6 @@
package cn.iocoder.dashboard.modules.system.mq.consumer; package cn.iocoder.dashboard.modules.system.mq.consumer.permission;
import cn.iocoder.dashboard.framework.redis.core.listener.AbstractMessageListener; import cn.iocoder.dashboard.framework.redis.core.pubsub.AbstractChannelMessageListener;
import cn.iocoder.dashboard.modules.system.mq.message.permission.SysMenuRefreshMessage; import cn.iocoder.dashboard.modules.system.mq.message.permission.SysMenuRefreshMessage;
import cn.iocoder.dashboard.modules.system.service.permission.SysMenuService; import cn.iocoder.dashboard.modules.system.service.permission.SysMenuService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -8,9 +8,14 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
/**
* {@link SysMenuRefreshMessage}
*
* @author
*/
@Component @Component
@Slf4j @Slf4j
public class SysMenuRefreshConsumer extends AbstractMessageListener<SysMenuRefreshMessage> { public class SysMenuRefreshConsumer extends AbstractChannelMessageListener<SysMenuRefreshMessage> {
@Resource @Resource
private SysMenuService menuService; private SysMenuService menuService;
@ -18,12 +23,7 @@ public class SysMenuRefreshConsumer extends AbstractMessageListener<SysMenuRefre
@Override @Override
public void onMessage(SysMenuRefreshMessage message) { public void onMessage(SysMenuRefreshMessage message) {
log.info("[onMessage][收到 Menu 刷新消息]"); log.info("[onMessage][收到 Menu 刷新消息]");
menuService.init(); menuService.initLocalCache();
}
@Override
public String getChannel() {
return SysMenuRefreshMessage.TOPIC;
} }
} }

View File

@ -0,0 +1,17 @@
package cn.iocoder.dashboard.modules.system.mq.message.dict;
import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage;
import lombok.Data;
/**
* Message
*/
@Data
public class SysDictDataRefreshMessage implements ChannelMessage {
@Override
public String getChannel() {
return "system.dict-data.refresh";
}
}

View File

@ -1 +0,0 @@
package cn.iocoder.dashboard.modules.system.mq.message;

View File

@ -1,13 +1,17 @@
package cn.iocoder.dashboard.modules.system.mq.message.permission; package cn.iocoder.dashboard.modules.system.mq.message.permission;
import cn.iocoder.dashboard.framework.redis.core.pubsub.ChannelMessage;
import lombok.Data; import lombok.Data;
/** /**
* Message * Message
*/ */
@Data @Data
public class SysMenuRefreshMessage { public class SysMenuRefreshMessage implements ChannelMessage {
public static final String TOPIC = "system.menu.refresh"; @Override
public String getChannel() {
return "system.menu.refresh";
}
} }

View File

@ -0,0 +1,27 @@
package cn.iocoder.dashboard.modules.system.mq.producer.dict;
import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils;
import cn.iocoder.dashboard.modules.system.mq.message.dict.SysDictDataRefreshMessage;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* DictData Producer
*/
@Component
public class SysDictDataProducer {
@Resource
private StringRedisTemplate stringRedisTemplate;
/**
* {@link SysDictDataRefreshMessage}
*/
public void sendMenuRefreshMessage() {
SysDictDataRefreshMessage message = new SysDictDataRefreshMessage();
RedisMessageUtils.sendChannelMessage(stringRedisTemplate, message);
}
}

View File

@ -1 +0,0 @@
package cn.iocoder.dashboard.modules.system.mq.producer;

View File

@ -1,7 +1,7 @@
package cn.iocoder.dashboard.modules.system.mq.producer.permission; package cn.iocoder.dashboard.modules.system.mq.producer.permission;
import cn.iocoder.dashboard.framework.redis.core.util.RedisMessageUtils;
import cn.iocoder.dashboard.modules.system.mq.message.permission.SysMenuRefreshMessage; import cn.iocoder.dashboard.modules.system.mq.message.permission.SysMenuRefreshMessage;
import cn.iocoder.dashboard.util.json.JSONUtils;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -21,7 +21,7 @@ public class SysMenuProducer {
*/ */
public void sendMenuRefreshMessage() { public void sendMenuRefreshMessage() {
SysMenuRefreshMessage message = new SysMenuRefreshMessage(); SysMenuRefreshMessage message = new SysMenuRefreshMessage();
stringRedisTemplate.convertAndSend(SysMenuRefreshMessage.TOPIC, JSONUtils.toJSONString(message)); RedisMessageUtils.sendChannelMessage(stringRedisTemplate, message);
} }
} }

View File

@ -18,9 +18,9 @@ import java.util.List;
public interface SysDictDataService extends DictDataFrameworkService { public interface SysDictDataService extends DictDataFrameworkService {
/** /**
* *
*/ */
void init(); void initLocalCache();
/** /**
* *

View File

@ -1,8 +1,10 @@
package cn.iocoder.dashboard.modules.system.service.dict.impl; package cn.iocoder.dashboard.modules.system.service.dict.impl;
import cn.hutool.core.collection.CollUtil;
import cn.iocoder.dashboard.common.enums.CommonStatusEnum; import cn.iocoder.dashboard.common.enums.CommonStatusEnum;
import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil; import cn.iocoder.dashboard.common.exception.util.ServiceExceptionUtil;
import cn.iocoder.dashboard.common.pojo.PageResult; import cn.iocoder.dashboard.common.pojo.PageResult;
import cn.iocoder.dashboard.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO; import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataCreateReqVO;
import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataExportReqVO; import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataExportReqVO;
import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataPageReqVO; import cn.iocoder.dashboard.modules.system.controller.dict.vo.data.SysDictDataPageReqVO;
@ -11,15 +13,19 @@ import cn.iocoder.dashboard.modules.system.convert.dict.SysDictDataConvert;
import cn.iocoder.dashboard.modules.system.dal.mysql.dao.dict.SysDictDataMapper; import cn.iocoder.dashboard.modules.system.dal.mysql.dao.dict.SysDictDataMapper;
import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictDataDO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictDataDO;
import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictTypeDO; import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictTypeDO;
import cn.iocoder.dashboard.modules.system.mq.producer.dict.SysDictDataProducer;
import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService; import cn.iocoder.dashboard.modules.system.service.dict.SysDictDataService;
import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService; import cn.iocoder.dashboard.modules.system.service.dict.SysDictTypeService;
import com.google.common.collect.ImmutableTable; import com.google.common.collect.ImmutableTable;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.Date;
import java.util.List; import java.util.List;
import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*; import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*;
@ -30,12 +36,22 @@ import static cn.iocoder.dashboard.modules.system.enums.SysErrorCodeConstants.*;
* @author ruoyi * @author ruoyi
*/ */
@Service @Service
@Slf4j
public class SysDictDataServiceImpl implements SysDictDataService { public class SysDictDataServiceImpl implements SysDictDataService {
/**
* dictType > sort
*/
private static final Comparator<SysDictDataDO> COMPARATOR_TYPE_AND_SORT = Comparator private static final Comparator<SysDictDataDO> COMPARATOR_TYPE_AND_SORT = Comparator
.comparing(SysDictDataDO::getDictType) .comparing(SysDictDataDO::getDictType)
.thenComparingInt(SysDictDataDO::getSort); .thenComparingInt(SysDictDataDO::getSort);
/**
* {@link #schedulePeriodicRefresh()}
* Redis Pub/Sub
*/
private static final long SCHEDULER_PERIOD = 5 * 60 * 1000L;
/** /**
* key 使 label * key 使 label
* *
@ -50,6 +66,10 @@ public class SysDictDataServiceImpl implements SysDictDataService {
* key2 value * key2 value
*/ */
private ImmutableTable<String, String, SysDictDataDO> valueDictDataCache; private ImmutableTable<String, String, SysDictDataDO> valueDictDataCache;
/**
*
*/
private volatile Date maxUpdateTime;
@Resource @Resource
private SysDictTypeService dictTypeService; private SysDictTypeService dictTypeService;
@ -57,20 +77,56 @@ public class SysDictDataServiceImpl implements SysDictDataService {
@Resource @Resource
private SysDictDataMapper dictDataMapper; private SysDictDataMapper dictDataMapper;
@Resource
private SysDictDataProducer dictDataProducer;
@Override @Override
@PostConstruct @PostConstruct
public void init() { public void initLocalCache() {
// 获得字典数据 // 获取字典数据列表,如果有更新
List<SysDictDataDO> list = this.listDictDatas(); List<SysDictDataDO> dataList = this.loadDictDataIfUpdate(maxUpdateTime);
if (CollUtil.isEmpty(dataList)) {
return;
}
// 构建缓存 // 构建缓存
ImmutableTable.Builder<String, String, SysDictDataDO> labelDictDataBuilder = ImmutableTable.builder(); ImmutableTable.Builder<String, String, SysDictDataDO> labelDictDataBuilder = ImmutableTable.builder();
ImmutableTable.Builder<String, String, SysDictDataDO> valueDictDataBuilder = ImmutableTable.builder(); ImmutableTable.Builder<String, String, SysDictDataDO> valueDictDataBuilder = ImmutableTable.builder();
list.forEach(dictData -> { dataList.forEach(dictData -> {
labelDictDataBuilder.put(dictData.getDictType(), dictData.getLabel(), dictData); labelDictDataBuilder.put(dictData.getDictType(), dictData.getLabel(), dictData);
valueDictDataBuilder.put(dictData.getDictType(), dictData.getValue(), dictData); valueDictDataBuilder.put(dictData.getDictType(), dictData.getValue(), dictData);
}); });
labelDictDataCache = labelDictDataBuilder.build(); labelDictDataCache = labelDictDataBuilder.build();
valueDictDataCache = valueDictDataBuilder.build(); valueDictDataCache = valueDictDataBuilder.build();
assert dataList.size() > 0; // 断言,避免告警
maxUpdateTime = dataList.stream().max(Comparator.comparing(BaseDO::getUpdateTime)).get().getUpdateTime();
log.info("[init][缓存字典数据,数量为:{}]", dataList.size());
}
@Scheduled(fixedDelay = SCHEDULER_PERIOD, initialDelay = SCHEDULER_PERIOD)
public void schedulePeriodicRefresh() {
initLocalCache();
}
/**
*
*
*
* @param maxUpdateTime
* @return
*/
private List<SysDictDataDO> loadDictDataIfUpdate(Date maxUpdateTime) {
// 第一步,判断是否要更新。
if (maxUpdateTime == null) { // 如果更新时间为空,说明 DB 一定有新数据
log.info("[loadDictDataIfUpdate][首次加载全量字典数据]");
} else { // 判断数据库中是否有更新的字典数据
if (!dictDataMapper.selectExistsByUpdateTimeAfter(maxUpdateTime)) {
return null;
}
log.info("[loadDictDataIfUpdate][增量加载全量字典数据]");
}
// 第二步,如果有更新,则从数据库加载所有字典数据
return dictDataMapper.selectList();
} }
@Override @Override
@ -104,6 +160,8 @@ public class SysDictDataServiceImpl implements SysDictDataService {
// 插入字典类型 // 插入字典类型
SysDictDataDO dictData = SysDictDataConvert.INSTANCE.convert(reqVO); SysDictDataDO dictData = SysDictDataConvert.INSTANCE.convert(reqVO);
dictDataMapper.insert(dictData); dictDataMapper.insert(dictData);
// 发送消息
dictDataProducer.sendMenuRefreshMessage();
return dictData.getId(); return dictData.getId();
} }
@ -114,6 +172,8 @@ public class SysDictDataServiceImpl implements SysDictDataService {
// 更新字典类型 // 更新字典类型
SysDictDataDO updateObj = SysDictDataConvert.INSTANCE.convert(reqVO); SysDictDataDO updateObj = SysDictDataConvert.INSTANCE.convert(reqVO);
dictDataMapper.updateById(updateObj); dictDataMapper.updateById(updateObj);
// 发送消息
dictDataProducer.sendMenuRefreshMessage();
} }
@Override @Override
@ -122,6 +182,8 @@ public class SysDictDataServiceImpl implements SysDictDataService {
this.checkDictDataExists(id); this.checkDictDataExists(id);
// 删除字典数据 // 删除字典数据
dictDataMapper.deleteById(id); dictDataMapper.deleteById(id);
// 发送消息
dictDataProducer.sendMenuRefreshMessage();
} }
@Override @Override

View File

@ -16,9 +16,9 @@ import java.util.List;
public interface SysMenuService { public interface SysMenuService {
/** /**
* *
*/ */
void init(); void initLocalCache();
/** /**
* *

View File

@ -77,8 +77,8 @@ public class SysMenuServiceImpl implements SysMenuService {
*/ */
@Override @Override
@PostConstruct @PostConstruct
public synchronized void init() { public synchronized void initLocalCache() {
// 获取 // 获取菜单列表,如果有更新
List<SysMenuDO> menuList = this.loadMenuIfUpdate(maxUpdateTime); List<SysMenuDO> menuList = this.loadMenuIfUpdate(maxUpdateTime);
if (CollUtil.isEmpty(menuList)) { if (CollUtil.isEmpty(menuList)) {
return; return;
@ -100,7 +100,7 @@ public class SysMenuServiceImpl implements SysMenuService {
@Scheduled(fixedDelay = SCHEDULER_PERIOD, initialDelay = SCHEDULER_PERIOD) @Scheduled(fixedDelay = SCHEDULER_PERIOD, initialDelay = SCHEDULER_PERIOD)
public void schedulePeriodicRefresh() { public void schedulePeriodicRefresh() {
init(); initLocalCache();
} }
/** /**