本文整理汇总了Java中org.jboss.resteasy.plugins.guice.ext.RequestScopeModule类的典型用法代码示例。如果您正苦于以下问题:Java RequestScopeModule类的具体用法?Java RequestScopeModule怎么用?Java RequestScopeModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RequestScopeModule类属于org.jboss.resteasy.plugins.guice.ext包,在下文中一共展示了RequestScopeModule类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: configure
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
@Override
protected void configure() {
install(new RequestScopeModule());
// Jackson for resteasy
bind(JacksonOptimizeProvider.class).in(Singleton.class);
// Jackson for guice
bind(ObjectMapper.class).toProvider(JacksonOptimizeProvider.class).in(Singleton.class);
bind(GossipExceptionProvider.class).in(Singleton.class);
bind(GossipValidateErrorProvider.class).in(Singleton.class);
bind(UnexpectedExceptionProvider.class).in(Singleton.class);
bind(IndexResource.class).in(Singleton.class);
bind(CommentResource.class).in(Singleton.class);
}
开发者ID:syhily,项目名称:gossip,代码行数:17,代码来源:GossipResourceModule.java
示例2: configure
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
@Override
protected void configure() {
install(new RequestScopeModule());
install(new JaxrsModule());
requireBinding(ObjectMapper.class);
findResourcesWith(Path.class);
findResourcesWith(Provider.class);
bind(BaseApi.class).to(BaseApiImpl.class);
bind(UsersApi.class).to(UsersApiImpl.class);
bind(GroupsApi.class).to(GroupsApiImpl.class);
bind(RepositoriesApi.class).to(RepositoriesApiImpl.class);
bind(RepositoryFacadeFactory.class).to(JGitRepositoryFacadeFactory.class);
bindSubResourceFactory(GroupApi.class, GroupApiImpl.class, GroupApiFactory.class);
bindSubResourceFactory(CommitApi.class, CommitApiImpl.class, CommitApiFactory.class);
bindSubResourceFactory(BranchApi.class, BranchApiImpl.class, BranchApiFactory.class);
bindSubResourceFactory(RepositoryApi.class, RepositoryApiImpl.class, RepositoryApiFactory.class);
bind(Config.class).toInstance(config);
}
开发者ID:devhub-tud,项目名称:git-server,代码行数:23,代码来源:GitServerModule.java
示例3: configure
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
@Override
protected void configure() {
install(new BeadledomModule());
install(new RequestScopeModule());
bind(FailureExceptionMapper.class);
}
开发者ID:cerner,项目名称:beadledom,代码行数:8,代码来源:ResteasyModule.java
示例4: configure
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
@Override
protected void configure() {
install(new RequestScopeModule());
bind(ResourceOne.class).to(ResourceOneImpl.class);
bind(ResourceTwo.class).to(ResourceTwoImpl.class);
}
开发者ID:cerner,项目名称:beadledom,代码行数:7,代码来源:FauxModule.java
示例5: configure
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
@Override
protected void configure() {
install(new RequestScopeModule());
bind(TestResource.class).to(TestResourceImpl.class);
}
开发者ID:cerner,项目名称:beadledom,代码行数:6,代码来源:FauxModule.java
示例6: main
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
String eddiEnv = System.getProperty(ENVIRONMENT_KEY);
if (eddiEnv == null || eddiEnv.isEmpty()) {
System.err.println("Environment Variable must not be null nor empty! (e.g. -DEDDI_ENV=[development/production])");
System.exit(1);
}
final String configDir = FileUtilities.buildPath(USER_DIR, "config", eddiEnv);
//bootstrapping modules
DependencyInjector.Environment environment = DependencyInjector.Environment.valueOf(eddiEnv.toUpperCase());
Module[] modules = {
new RuntimeModule(
new FileInputStream(configDir + "threads.properties"),
new FileInputStream(configDir + "systemRuntime.properties")),
new RequestScopeModule(),
new RestInterfaceModule(),
new SerializationModule(),
new PersistenceModule(new FileInputStream(configDir + "mongodb.properties")),
new ConversationMemoryModule(),
new PermissionModule(),
new ExpressionModule(),
new RepositoryModule(),
new UserModule(),
new CachingModule(new FileInputStream(configDir + "infinispan.xml")),
new SemanticParserModule(),
new BehaviorModule(),
new OutputGenerationModule(),
new TemplateEngineModule(),
new PropertyDisposerModule(),
new AutomatedtestingModule(),
new StaticResourcesModule(),
new HttpClientModule(),
new ConversationCallbackModule(new FileInputStream(configDir + "httpClient.properties")),
new CoreModule(),
new SwaggerModule(new FileInputStream(configDir + "swagger.properties")),
new ServerRuntimeModule(new FileInputStream(configDir + "webServer.properties")),
new FacebookMessengerModule(),
new BackupServiceModule(),
};
//init modules
final DependencyInjector injector = DependencyInjector.init(environment, modules);
//init webserver
injector.getInstance(IServerRuntime.class).startup(() -> {
//auto re-deploy bots
injector.getInstance(IAutoBotDeployment.class).autoDeployBots();
});
}
开发者ID:labsai,项目名称:EDDI,代码行数:51,代码来源:ApiServer.java
示例7: getModules
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
@Override
protected List<? extends Module> getModules(ServletContext context) {
logger.entry(context);
return Arrays.asList(new BootstrapPropertiesModule(), new RequestScopeModule(), new DefaultShiroModule(context), new ShiroAopModule(), new BootstrapRestPackagesModule());
}
开发者ID:pabiagioli,项目名称:webshooters,代码行数:6,代码来源:DefaultServletContextListener.java
示例8: getModules
import org.jboss.resteasy.plugins.guice.ext.RequestScopeModule; //导入依赖的package包/类
@Override
protected List<? extends Module> getModules(ServletContext context) {
logger.entry(context);
return Arrays.asList(new BootstrapPropertiesModule(), new RequestScopeModule(), new BootstrapShiroModule(context), new ShiroAnnotationsModule(),new BootstrapRestPackagesModule());
}
开发者ID:pabiagioli,项目名称:shiro-guice-async-webapp,代码行数:6,代码来源:GenericGuiceRestEasyContextListener.java
注:本文中的org.jboss.resteasy.plugins.guice.ext.RequestScopeModule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论