FEAT Added sample code for BAEL-3494

This commit is contained in:
Juan Moreno
2020-05-25 01:43:34 -03:00
parent 29cbc2915d
commit f1b779d332
5 changed files with 105 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
package com.baeldung.multireleaseapp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class App {
private static final Logger logger = LoggerFactory.getLogger(App.class);
public static void main(String[] args) {
logger.info(String.format("Running on %s", new DefaultVersion().version()));
}
}

View File

@@ -0,0 +1,9 @@
package com.baeldung.multireleaseapp;
public class DefaultVersion implements Version {
@Override
public String version() {
return System.getProperty("java.version");
}
}

View File

@@ -0,0 +1,5 @@
package com.baeldung.multireleaseapp;
interface Version {
public String version();
}

View File

@@ -0,0 +1,9 @@
package com.baeldung.multireleaseapp;
public class DefaultVersion implements Version {
@Override
public String version() {
return Runtime.version().toString();
}
}