org.jooby.Env.onStarted()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中org.jooby.Env.onStarted()方法的一些代码示例,展示了Env.onStarted()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Env.onStarted()方法的具体详情如下:
包路径:org.jooby.Env
类名称:Env
方法名:onStarted

Env.onStarted介绍

暂无

代码示例

代码示例来源:origin: jooby-project/jooby

env.onStarted(() -> dskeys.forEach(env::unset));

代码示例来源:origin: jooby-project/jooby

@Override public void configure(final Env env, final Config conf, final Binder binder)
  throws Throwable {
 Path userdir = Paths.get(System.getProperty("user.dir"));
 Path workDirectory = Optional.ofNullable(this.workDirectory)
   .orElse(userdir);
 Path installDirectory = Optional.ofNullable(this.installDirectory).orElse(workDirectory);
 ProxyConfig proxy = new ProxyConfig(proxies(conf));
 CacheResolver cache = Files.exists(userdir.resolve("pom.xml"))
   ? new MavenCacheResolver()
   : null;
 FrontendPluginFactory factory = new FrontendPluginFactory(workDirectory.toFile(),
   installDirectory.toFile(), cache);
 installNode(conf, nodeVersion, proxy, factory);
 Map<String, String> environment = environment(conf);
 NodeTask task = newTask(factory, conf, proxy, environment, nodeVersion);
 onSyncPackageJson(conf, workDirectory, task::executeSync);
 if (onStart == null && onStarted == null) {
  onStart = cmd -> cmd.execute("run", "build");
 }
 if (onStart != null) {
  env.onStart(() -> onStart.accept(task));
 }
 if (onStarted != null) {
  env.onStarted(() -> onStarted.accept(task));
 }
}

代码示例来源:origin: jooby-project/jooby

compiler.setProgressBar(progressBar);
 Future<Map<String, List<File>>> future = liveCompiler.sync();
 env.onStarted(() -> {
  Logger log = LoggerFactory.getLogger(AssetCompiler.class);
  if (!future.isDone()) {
} else {
 env.onStarted(liveCompiler::watch);

代码示例来源:origin: jooby-project/jooby

env.onStarted(() -> agentClient.register(registration));
env.onStop(() -> agentClient.deregister(registration.getId()));

代码示例来源:origin: org.jooby/jooby-assets

compiler.setProgressBar(progressBar);
 Future<Map<String, List<File>>> future = liveCompiler.sync();
 env.onStarted(() -> {
  Logger log = LoggerFactory.getLogger(AssetCompiler.class);
  if (!future.isDone()) {
} else {
 env.onStarted(liveCompiler::watch);

代码示例来源:origin: org.jooby/jooby-consul

env.onStarted(() -> agentClient.register(registration));
env.onStop(() -> agentClient.deregister(registration.getId()));

相关文章