mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 14:39:21 +08:00
perf: 补充启动日志
This commit is contained in:
parent
1e96c112ba
commit
74d604b75a
@ -41,7 +41,7 @@ public class ParamService extends ServiceImpl<ParamMapper, ParamEntity> {
|
||||
*/
|
||||
@EventListener(ApplicationStartedEvent.class)
|
||||
public void refresh() {
|
||||
log.info("[ BASE] 初始化系统参数缓存");
|
||||
log.info("[ PARAM] 初始化系统参数缓存");
|
||||
CACHE.clear();
|
||||
List<ParamEntity> params = baseMapper.selectList(new QueryWrapper<>());
|
||||
if (CollUtil.isEmpty(params)) {
|
||||
|
@ -15,6 +15,7 @@ import com.blossom.backend.base.user.pojo.UserEntity;
|
||||
import com.blossom.common.base.exception.XzException500;
|
||||
import com.blossom.common.base.util.BeanUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.context.event.ApplicationStartedEvent;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -28,6 +29,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 用户参数
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class UserParamService extends ServiceImpl<UserParamMapper, UserParamEntity> {
|
||||
@ -42,6 +44,7 @@ public class UserParamService extends ServiceImpl<UserParamMapper, UserParamEnti
|
||||
*/
|
||||
@EventListener(ApplicationStartedEvent.class)
|
||||
public void refresh() {
|
||||
log.info("[ U_PARAM] 初始化用户参数缓存");
|
||||
CACHE.clear();
|
||||
List<UserEntity> users = userMapper.selectList(new QueryWrapper<>());
|
||||
// 初始化所有用户的配置参数
|
||||
|
Loading…
Reference in New Issue
Block a user