mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
add common 依赖 spring-boot-properties-migrator ;
add 新增 modules 模块, 包含 demo, generator, job, system 模块 ; update 更新模块包名 rateLimiter => ratelimiter ; refactor 重构 ratelimiter 模块, 参考幂等模块加入自动装配相关配置 ; fix 修正 AsyncConfig 实现接口 ; fix 修正 SwaggerConfig 注解写法 ; fix 修正 ruoyi-common-doc pom 描述 ; delete LogAspect 去掉无用注解 ;
This commit is contained in:
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.system.runner;
|
||||
|
||||
import com.ruoyi.common.core.config.RuoYiConfig;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
import com.ruoyi.system.service.ISysOssConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 初始化 system 模块对应业务数据
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
public class SystemApplicationRunner implements ApplicationRunner {
|
||||
|
||||
private final RuoYiConfig ruoyiConfig;
|
||||
private final ISysConfigService configService;
|
||||
private final ISysDictTypeService dictTypeService;
|
||||
private final ISysOssConfigService ossConfigService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
ossConfigService.init();
|
||||
log.info("初始化OSS配置成功");
|
||||
if (ruoyiConfig.isCacheLazy()) {
|
||||
return;
|
||||
}
|
||||
configService.loadingConfigCache();
|
||||
log.info("加载参数缓存数据成功");
|
||||
dictTypeService.loadingDictCache();
|
||||
log.info("加载字典缓存数据成功");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user