![JAR search and dependency download from the Maven repository](/logo.png)
webpiecesxxxxxpackage.basesvr.RandomInstanceId Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of WEBPIECESxAPPNAME Show documentation
Show all versions of WEBPIECESxAPPNAME Show documentation
Someone forgot to fill this in. See http://stackoverflow.com/questions/38272550/how-to-fail-the-gradle-build-if-subproject-is-missing-a-property
package webpiecesxxxxxpackage.basesvr;
import org.apache.commons.lang3.RandomStringUtils;
public class RandomInstanceId {
public static String generate() {
String instanceId = RandomStringUtils.randomAlphanumeric(6);
String s1 = instanceId.substring(0, 3);
String s2 = instanceId.substring(3, 6);
return s1+"-"+s2; //human readable instance id
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy