本文整理了Java中org.jooby.Env.lifeCycle()
方法的一些代码示例,展示了Env.lifeCycle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Env.lifeCycle()
方法的具体详情如下:
包路径:org.jooby.Env
类名称:Env
方法名:lifeCycle
暂无
代码示例来源:origin: jooby-project/jooby
@Override
public void configure(final Env env, final Config config, final Binder binder) {
jobMap.putAll(JobExpander.jobs(config, jobs));
binder.bind(Scheduler.class).toProvider(QuartzProvider.class).asEagerSingleton();
env.lifeCycle(QuartzProvider.class);
binder.bind(new TypeLiteral<Map<JobDetail, Trigger>>() {
}).annotatedWith(Names.named("org.quartz.jobs")).toInstance(jobMap);
}
代码示例来源:origin: jooby-project/jooby
@Override
public void configure(final Env env, final Config config, final Binder binder) {
HibernateValidatorConfiguration configuration = byProvider(HibernateValidator.class)
.configure();
if (config.hasPath("hibernate.validator")) {
config.getConfig("hibernate.validator").root().forEach((k, v) -> configuration.addProperty("hibernate.validator." + k, v.unwrapped().toString()));
}
if (configurer != null) {
configurer.accept(configuration, config);
}
binder.bind(HibernateValidatorConfiguration.class).toInstance(configuration);
binder.bind(Validator.class).toProvider(HbvFactory.class).asEagerSingleton();
env.lifeCycle(HbvFactory.class);
Multibinder.newSetBinder(binder, Parser.class).addBinding()
.toInstance(new HbvParser(predicate));
}
代码示例来源:origin: jooby-project/jooby
env.lifeCycle(klass);
};
代码示例来源:origin: jooby-project/jooby
ctx.addComponent("properties", properties);
env.lifeCycle(CamelFinalizer.class);
代码示例来源:origin: org.jooby/jooby-quartz
@Override
public void configure(final Env env, final Config config, final Binder binder) {
jobMap.putAll(JobExpander.jobs(config, jobs));
binder.bind(Scheduler.class).toProvider(QuartzProvider.class).asEagerSingleton();
env.lifeCycle(QuartzProvider.class);
binder.bind(new TypeLiteral<Map<JobDetail, Trigger>>() {
}).annotatedWith(Names.named("org.quartz.jobs")).toInstance(jobMap);
}
代码示例来源:origin: org.jooby/jooby-hbv
@Override
public void configure(final Env env, final Config config, final Binder binder) {
HibernateValidatorConfiguration configuration = byProvider(HibernateValidator.class)
.configure();
if (config.hasPath("hibernate.validator")) {
config.getConfig("hibernate.validator").root().forEach((k, v) -> configuration.addProperty("hibernate.validator." + k, v.unwrapped().toString()));
}
if (configurer != null) {
configurer.accept(configuration, config);
}
binder.bind(HibernateValidatorConfiguration.class).toInstance(configuration);
binder.bind(Validator.class).toProvider(HbvFactory.class).asEagerSingleton();
env.lifeCycle(HbvFactory.class);
Multibinder.newSetBinder(binder, Parser.class).addBinding()
.toInstance(new HbvParser(predicate));
}
代码示例来源:origin: org.jooby/jooby-scanner
env.lifeCycle(klass);
};
代码示例来源:origin: org.jooby/jooby-camel
ctx.addComponent("properties", properties);
env.lifeCycle(CamelFinalizer.class);
内容来源于网络,如有侵权,请联系作者删除!