本文整理汇总了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);
}