优化
This commit is contained in:
@@ -44,7 +44,7 @@ public class CacheModuleEngine extends ModuleEngine {
|
||||
public void onAppPostInit() {
|
||||
//设置缓存管理器
|
||||
this.cacheManager = CacheManagerService.create(null).enabled(false);
|
||||
final AnyValue cacheConf = environment.getAnyValue("redkale.cache", false);
|
||||
final AnyValue cacheConf = application.getAppConfig().getAnyValue("cache");;
|
||||
this.resourceFactory.inject(this.cacheManager);
|
||||
if (!application.isCompileMode() && cacheConf != null) {
|
||||
this.cacheManager.init(cacheConf);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class ClusterModuleEngine extends ModuleEngine {
|
||||
//第三方服务注册配置项的变更
|
||||
if (!clusterChangedProps.isEmpty() || !clusterRemovedKeys.isEmpty()) {
|
||||
if (this.clusterAgent != null) {
|
||||
final AnyValueWriter old = (AnyValueWriter) environment.getAnyValue("redkale.cluster", false);
|
||||
final AnyValueWriter old = (AnyValueWriter) application.getAppConfig().getAnyValue("cluster");
|
||||
Properties newProps = new Properties();
|
||||
newProps.putAll(clusterProperties);
|
||||
List<ResourceEvent> changeEvents = new ArrayList<>();
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ScheduleModuleEngine extends ModuleEngine {
|
||||
public void onAppPostInit() {
|
||||
//设置定时管理器
|
||||
this.scheduleManager = ScheduleManagerService.create(null).enabled(false);
|
||||
final AnyValue scheduleConf = environment.getAnyValue("redkale.schedule", true);
|
||||
final AnyValue scheduleConf = application.getAppConfig().getAnyValue("schedule", true);
|
||||
this.resourceFactory.inject(this.scheduleManager);
|
||||
if (!application.isCompileMode()) {
|
||||
this.scheduleManager.init(scheduleConf);
|
||||
|
||||
Reference in New Issue
Block a user