Procházet zdrojové kódy

print version on startup

tags/v1.1.4
Jonathan Cobb před 4 roky
rodič
revize
ebf9b42101
2 změnil soubory, kde provedl 4 přidání a 3 odebrání
  1. +1
    -1
      bubble-server/src/main/java/bubble/server/BubbleConfiguration.java
  2. +3
    -2
      bubble-server/src/main/java/bubble/server/BubbleServer.java

+ 1
- 1
bubble-server/src/main/java/bubble/server/BubbleConfiguration.java Zobrazit soubor

@@ -246,7 +246,7 @@ public class BubbleConfiguration extends PgRestServerConfiguration
return SCHEME_HTTPS + node.getFqdn() + ":" + node.getSslPort() + getHttp().getBaseUri();
}

private String getVersion () {
public static String getVersion () {
final Properties properties = new Properties();
try {
properties.load(loadResourceAsStream("META-INF/bubble/bubble.properties"));


+ 3
- 2
bubble-server/src/main/java/bubble/server/BubbleServer.java Zobrazit soubor

@@ -31,6 +31,7 @@ import java.util.concurrent.atomic.AtomicReference;

import static bubble.ApiConstants.HOME_DIR;
import static bubble.model.cloud.BubbleNode.nodeFromFile;
import static bubble.server.BubbleConfiguration.getVersion;
import static bubble.service.boot.StandardSelfNodeService.THIS_NODE_FILE;
import static org.cobbzilla.util.daemon.ZillaRuntime.die;
import static org.cobbzilla.util.daemon.ZillaRuntime.empty;
@@ -86,14 +87,14 @@ public class BubbleServer extends RestServerBase<BubbleConfiguration> {

restoreKey.set(getRestoreKey());
if (restoreKey.get() != null) {
log.info("Starting BubbleServer in restore mode...");
log.info("Starting BubbleServer ("+getVersion()+") in restore mode...");
main(BubbleServer.class, RESTORE_LIFECYCLE_LISTENERS, configSource, env);
} else {
if (Boolean.parseBoolean(env.get(BUBBLE_DUMP_CONFIG))) {
log.info("Dumping BubbleConfiguration...");
dumpConfig(configSource);
} else {
log.info("Starting BubbleServer...");
log.info("Starting BubbleServer ("+getVersion()+")...");
main(BubbleServer.class, LIFECYCLE_LISTENERS, configSource, env);
}
}


Načítá se…
Zrušit
Uložit