Browse Source

REPORT-133286 fbp设计器获取云中心网址为空

fbp/merge
Destiny.Lin 4 months ago
parent
commit
15d1744ed5
  1. 32
      designer-realize/src/main/java/com/fanruan/boot/env/function/DesignUpdateComponent.java

32
designer-realize/src/main/java/com/fanruan/boot/env/function/DesignUpdateComponent.java vendored

@ -6,8 +6,14 @@ import com.fanruan.carina.annotions.FineComponent;
import com.fanruan.carina.annotions.Start;
import com.fanruan.carina.annotions.Stop;
import com.fanruan.carina.annotions.Supplemental;
import com.fanruan.cloud.FanruanCloud;
import com.fanruan.cloud.FinePassportServiceAdaptor;
import com.fanruan.cloud.metadata.ConfigServiceProvider;
import com.fanruan.cloud.site.SitesServiceProvider;
import com.fanruan.config.bbs.FineBBSConfigProvider;
import com.fanruan.update.base.UpdateSourceGroup;
import com.fanruan.update.plugins.UpdatePluginConfigGroup;
import com.fr.general.CloudCenter;
import com.fr.start.common.DesignerStartupContext;
import com.fr.update.ResourceUpdateManager;
import com.fr.update.base.DefaultSourcePath;
@ -40,7 +46,33 @@ public class DesignUpdateComponent {
*/
@Start
public void start() {
FanruanCloud.setSitesService(new SitesServiceProvider() {
@Override
public boolean enabled() {
return !CloudCenter.getInstance().isDisable();
}
@Override
public String acquireUrlByKind(String kind) {
return CloudCenter.getInstance().acquireUrlByKind(kind);
}
});
FanruanCloud.setConfigService(new ConfigServiceProvider() {
@Override
public boolean enabled() {
return !CloudCenter.getInstance().isDisable();
}
@Override
public String acquireConf(String kind) {
return CloudCenter.getInstance().acquireConf(kind);
}
public FineBBSConfigProvider getBBSConfig() {
return Carina.config(FineBBSConfigProvider.class);
}
});
FanruanCloud.setPassportService(new FinePassportServiceAdaptor());
if (DesignerStartupContext.getInstance().onWarmup()) {
try {
prepare4Start();

Loading…
Cancel
Save