本文整理匯總了Java中act.boot.app.RunApp類的典型用法代碼示例。如果您正苦於以下問題:Java RunApp類的具體用法?Java RunApp怎麽用?Java RunApp使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RunApp類屬於act.boot.app包,在下文中一共展示了RunApp類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: bootstrap
import act.boot.app.RunApp; //導入依賴的package包/類
private static void bootstrap(AppDescriptor appDescriptor) throws Exception {
long ts = $.ms();
String profile = SysProps.get(AppConfigKey.PROFILE.key());
if (S.blank(profile)) {
profile = "";
} else {
profile = "using profile[" + profile + "]";
}
String packageName = appDescriptor.getPackageName();
LOGGER.debug("run fullstack application with package[%s] %s", packageName, profile);
final String SCAN_PACKAGE = AppConfigKey.SCAN_PACKAGE.key();
if (S.notBlank(packageName)) {
System.setProperty(SCAN_PACKAGE, packageName);
}
FullStackAppBootstrapClassLoader classLoader = new FullStackAppBootstrapClassLoader(RunApp.class.getClassLoader());
Thread.currentThread().setContextClassLoader(classLoader);
Class<?> actClass = classLoader.loadClass("act.Act");
Method m = actClass.getDeclaredMethod("startup", byte[].class);
m.setAccessible(true);
$.invokeStatic(m, appDescriptor.toByteArray());
int port = $.invokeStatic(actClass, "httpPort");
LOGGER.info("app is ready at: http://%s:%s", getLocalIpAddr(), port);
LOGGER.info("it takes %sms to start the app\n", $.ms() - ts);
}
示例2: main
import act.boot.app.RunApp; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
RunApp.start("Hello World", Version.appVersion(), Example.class);
}
示例3: main
import act.boot.app.RunApp; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
RunApp.start("gallery", "2.0", MorphiaGalleryApp.class);
}
示例4: main
import act.boot.app.RunApp; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
RunApp.start(AutoObjectApp.class);
}
示例5: main
import act.boot.app.RunApp; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
System.setProperty("idgen.node_id.effective_ip_bytes.int", "1");
RunApp.start(BindingDemo.class);
}
示例6: main
import act.boot.app.RunApp; //導入依賴的package包/類
public static void main(String[] args) throws Exception {
RunApp.start(DocSampleApp.class);
}