本文整理汇总了Java中com.wordnik.swagger.jaxrs.listing.ResourceListingProvider类的典型用法代码示例。如果您正苦于以下问题:Java ResourceListingProvider类的具体用法?Java ResourceListingProvider怎么用?Java ResourceListingProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResourceListingProvider类属于com.wordnik.swagger.jaxrs.listing包,在下文中一共展示了ResourceListingProvider类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: configure
import com.wordnik.swagger.jaxrs.listing.ResourceListingProvider; //导入依赖的package包/类
@Override
protected void configure() {
requireBinding(SwaggerConfig.class);
// Create empty multibinder in case no ModelConverter bindings exist
Multibinder<ModelConverter> swaggerModelConverterBinder = Multibinder.newSetBinder(
binder(), ModelConverter.class);
bind(SwaggerApiResource.class);
bind(SwaggerUiResource.class);
bind(ApiDeclarationProvider.class);
bind(ResourceListingProvider.class);
bind(JaxrsApiReader.class).to(DefaultJaxrsApiReader.class);
bind(JaxrsScanner.class).to(SwaggerGuiceJaxrsScanner.class);
bind(SwaggerLifecycleHook.class).asEagerSingleton();
install(MultibindingsScanner.asModule());
}
开发者ID:cerner,项目名称:beadledom,代码行数:22,代码来源:SwaggerModule.java
示例2: getClasses
import com.wordnik.swagger.jaxrs.listing.ResourceListingProvider; //导入依赖的package包/类
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(ApiDeclarationProvider.class);
classes.add(ApiListingResourceJSON.class);
classes.add(ResourceListingProvider.class);
return classes;
}
开发者ID:IBMDecisionOptimization,项目名称:DOcloud-GreenTruck-sample,代码行数:10,代码来源:TruckingRestApplication.java
示例3: startServer
import com.wordnik.swagger.jaxrs.listing.ResourceListingProvider; //导入依赖的package包/类
private static void startServer() throws Exception {
Object jacksonJaxbJsonProvider = new JacksonJaxbJsonProvider();
Object crossOriginResourceSharingFilter = new CrossOriginResourceSharingFilter();
Object customWebApplicationExceptionMapper = new CustomWebApplicationExceptionMapper();
Object hippoAuthenticationRequestHandler = new HippoAuthenticationRequestHandler();
Object apiDeclarationProvider = new ApiDeclarationProvider();
Object resourceListingProvider = new ResourceListingProvider();
Object customJacksonConfig = new CustomJacksonConfig();
List<Object> providers = new ArrayList<Object>();
providers.add(customJacksonConfig);
providers.add(jacksonJaxbJsonProvider);
providers.add(crossOriginResourceSharingFilter);
providers.add(customWebApplicationExceptionMapper);
providers.add(hippoAuthenticationRequestHandler);
providers.add(apiDeclarationProvider);
providers.add(resourceListingProvider);
List<Class<?>> serviceClasses = new ArrayList<Class<?>>();
serviceClasses.add(ApiListingResourceJSON.class);
serviceClasses.add(RootResource.class);
serviceClasses.add(SystemResource.class);
serviceClasses.add(NodesResource.class);
serviceClasses.add(PropertiesResource.class);
serviceClasses.add(QueryResource.class);
serviceClasses.add(StatsResource.class);
serviceClasses.add(UsersResource.class);
serviceClasses.add(GroupsResource.class);
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setProviders(providers);
sf.setResourceClasses(serviceClasses);
sf.setAddress(HTTP_ENDPOINT_ADDRESS);
cxfServer = sf.create();
}
开发者ID:jreijn,项目名称:hippo-addon-restful-webservices,代码行数:37,代码来源:WebservicesIntegrationTest.java
示例4: init
import com.wordnik.swagger.jaxrs.listing.ResourceListingProvider; //导入依赖的package包/类
@Override
public void init(Application<? extends ApplicationConfiguration> application) {
application.addProvider(new ApiDeclarationProvider());
application.addProvider(new ResourceListingProvider());
application.addResource(ApiListingResourceJSON.class);
if (enableCors) {
application.addFilter(CorsFilter.class);
}
}
开发者ID:minnal,项目名称:minnal,代码行数:10,代码来源:ApiPlugin.java
示例5: shouldAddProvidersOnInit
import com.wordnik.swagger.jaxrs.listing.ResourceListingProvider; //导入依赖的package包/类
@Test
public void shouldAddProvidersOnInit() {
apiPlugin = new ApiPlugin(false);
apiPlugin.init(application);
verify(application, atLeastOnce()).addProvider(any(ApiDeclarationProvider.class));
verify(application, atLeastOnce()).addProvider(any(ResourceListingProvider.class));
}
开发者ID:minnal,项目名称:minnal,代码行数:8,代码来源:ApiPluginTest.java
示例6: getClasses
import com.wordnik.swagger.jaxrs.listing.ResourceListingProvider; //导入依赖的package包/类
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
classes.add(AuthenticationResource.class);
classes.add(InvitationResource.class);
classes.add(QuestionnaireDefinitionResource.class);
classes.add(QuestionnaireResource.class);
classes.add(UserResource.class);
classes.add(ResearchResource.class);
classes.add(ApiListingResourceJSON.class);
classes.add(ResourceListingProvider.class);
classes.add(ApiDeclarationProvider.class);
classes.add(JacksonContextResolver.class);
classes.add(JacksonJsonProvider.class);
classes.add(LoginShiroFilter.class);
classes.add(LogoutShiroFilter.class);
classes.add(ShiroExceptionHandler.class);
classes.add(AccountNotFoundExceptionHandler.class);
classes.add(DefaultExceptionHandler.class);
// Validation feature
classes.add(ValidationExceptionMapper.class);
classes.add(JAXRSBeanValidationInInterceptor.class);
classes.add(JAXRSBeanValidationOutInterceptor.class);
return classes;
}
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:31,代码来源:ApplicationConfig.java
示例7: registerSwagger
import com.wordnik.swagger.jaxrs.listing.ResourceListingProvider; //导入依赖的package包/类
private void registerSwagger(Environment environment, RestwarsConfiguration configuration) {
SwaggerConfig swagger = ConfigFactory.config();
swagger.setApiVersion("1.0.0");
swagger.setBasePath(configuration.getPublicUrl());
environment.jersey().register(new ApiListingResourceJSON());
environment.jersey().register(new ResourceListingProvider());
environment.jersey().register(new ApiDeclarationProvider());
ScannerFactory.setScanner(new DefaultJaxrsScanner());
ClassReaders.setReader(new DefaultJaxrsApiReader());
FilterFactory.setFilter(new SwaggerFilter());
}
开发者ID:phxql,项目名称:restwars,代码行数:14,代码来源:RestwarsApplication.java
注:本文中的com.wordnik.swagger.jaxrs.listing.ResourceListingProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论