当前位置: 首页>>代码示例>>Java>>正文


Java SwaggerSpringMvcPlugin类代码示例

本文整理汇总了Java中com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin的典型用法代码示例。如果您正苦于以下问题:Java SwaggerSpringMvcPlugin类的具体用法?Java SwaggerSpringMvcPlugin怎么用?Java SwaggerSpringMvcPlugin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SwaggerSpringMvcPlugin类属于com.mangofactory.swagger.plugin包,在下文中一共展示了SwaggerSpringMvcPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Bean
public SwaggerSpringMvcPlugin customImplementation() {
    return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
        .apiInfo(apiInfo())
        .pathProvider(new SwaggerPathProvider() {
            @Override
            protected String applicationPath() {
                return servletContext.getContextPath() + "/restapi";
            }

            @Override
            protected String getDocumentationPath() {
                return "/";
            }
        })
        .includePatterns(".*").useDefaultResponseMessages(false);
}
 
开发者ID:react-dev26,项目名称:NGB-master,代码行数:19,代码来源:SwaggerConfig.java

示例2: swaggerSpringMvcPlugin

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin() {
    CustomModelPropertiesProvider propertiesProvider = new CustomModelPropertiesProvider(defaultModelPropertiesProvider, alternateTypeProvider, new CustomAccessorsProvider(typeResolver));
    ModelDependencyProvider modelDependencyProvider = new ModelDependencyProvider(typeResolver, alternateTypeProvider, propertiesProvider);

    DefaultModelProvider modelProvider = new DefaultModelProvider(typeResolver, alternateTypeProvider, propertiesProvider, modelDependencyProvider);

    return new SwaggerSpringMvcPlugin(springSwaggerConfig)
            .modelProvider(modelProvider)
            .alternateTypeRules(
                    new GenericAlternateTypeRule(ResponseEntity.class, 0, null, null),
                    new GenericAlternateTypeRule(DeferredResult.class, 0, null, null),
                    new GenericAlternateTypeRule(Future.class, 0, null, null),
                    new GenericAlternateTypeRule(scala.concurrent.Future.class, 0, null, null))
            .apiVersion(appVersion)
            .apiInfo(new ApiInfo(null, null, null, null, null, null));
}
 
开发者ID:Kixeye,项目名称:chassis,代码行数:18,代码来源:SwaggerConfiguration.java

示例3: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
 * Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc
 * framework - allowing for multiple swagger groups i.e. same code base
 * multiple swagger resource listings.
 */
@Bean
public SwaggerSpringMvcPlugin customImplementation()
{
    return new SwaggerSpringMvcPlugin(this.springSwaggerConfig).apiInfo(apiInfo()).includePatterns(
            ".*?");
}
 
开发者ID:simbest,项目名称:simbest-cores,代码行数:12,代码来源:SwaggerConfig.java

示例4: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
    public SwaggerSpringMvcPlugin customImplementation() {
//        TypeResolver typeResolver = new TypeResolver();
//        AlternateTypeRule rules = Alternates.newRule(
//                    typeResolver.resolve(ResponseEntity.class, WildcardType.class), 
//                    //with List<T> for any T
//                    typeResolver.resolve(List.class, WildcardType.class));
        
        return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
                .apiInfo(apiInfo())
                .includePatterns(".*/*.*")
                .genericModelSubstitutes(List.class);
    }
 
开发者ID:dovier,项目名称:coj-web,代码行数:14,代码来源:SwaggerSpringMvcConfig.java

示例5: groupOnePlugin

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin groupOnePlugin() {
    return new SwaggerSpringMvcPlugin(springSwaggerConfig).
            apiInfo(apiInfo()).
            includePatterns("/api/.*").
            swaggerGroup("erudio");
}
 
开发者ID:leandrocgsi,项目名称:erudio-api-oauth2,代码行数:8,代码来源:SwaggerConfig.java

示例6: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
 * Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc framework - allowing for multiple
 * swagger groups i.e. same code base multiple swagger resource listings.
 */
@Bean
public SwaggerSpringMvcPlugin customImplementation(){
   return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
           .includePatterns(".*").apiInfo(new ApiInfo(
         		  "Cloudstreet Market / Swagger UI",
         		  "The Rest API developed with Spring MVC Cookbook [PACKT]",
         		  "",
         		  "[email protected]",
         		  "GNU GENERAL PUBLIC LICENSE v2",
         		  "http://www.gnu.org/licenses/gpl-2.0.html"));
}
 
开发者ID:alex-bretet,项目名称:cloudstreetmarket.com,代码行数:16,代码来源:AnnotationConfig.java

示例7: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin customImplementation() {

    springSwaggerConfig.defaultSwaggerPathProvider().setApiResourcePrefix("api");

    return new SwaggerSpringMvcPlugin(springSwaggerConfig).apiInfo(apiInfo())
        .includePatterns(includePattern)
        .ignoredParameterTypes(Model.class);
}
 
开发者ID:Contargo,项目名称:iris,代码行数:10,代码来源:SwaggerConfig.java

示例8: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
     * Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc framework - allowing for multiple
     * swagger groups i.e. same code base multiple swagger resource listings.
     */
    @Bean
    public SwaggerSpringMvcPlugin customImplementation() {
        return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
//                .includePatterns(".*pet.*");
                .includePatterns(".*?");
    }
 
开发者ID:asdf2014,项目名称:yuzhouwan,代码行数:11,代码来源:MySwaggerConfig.java

示例9: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean //Don't forget the @Bean annotation
public SwaggerSpringMvcPlugin customImplementation()
{
	return new SwaggerSpringMvcPlugin( this.springSwaggerConfig )
			.apiInfo( apiInfo() )
			.includePatterns( ".*api.*" );
}
 
开发者ID:wimdeblauwe,项目名称:springboot-swagger-test,代码行数:8,代码来源:SwaggerConfiguration.java

示例10: swaggerSpringMvcPlugin

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
 * Swagger Spring MVC configuration
 */
@Bean
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin(SpringSwaggerConfig springSwaggerConfig) {
    return new SwaggerSpringMvcPlugin(springSwaggerConfig)
            .apiInfo(apiInfo())
            .genericModelSubstitutes(ResponseEntity.class)
            .includePatterns(DEFAULT_INCLUDE_PATTERN);
}
 
开发者ID:stryng,项目名称:JQuaternion,代码行数:11,代码来源:SwaggerConfiguration.java

示例11: swaggerSpringMvcPlugin

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
/**
 * Every SwaggerSpringMvcPlugin bean is picked up by the swagger-mvc framework - allowing for multiple
 * swagger groups i.e. same code base multiple swagger resource listings.
 */
@Bean //Don't forget the @Bean annotation
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin(){
    return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
            .apiInfo(apiInfo())
            .genericModelSubstitutes(ResponseEntity.class)
            .build();
}
 
开发者ID:stephenzr,项目名称:swagger-integration-examples,代码行数:12,代码来源:RecordShopSwaggerConfig.java

示例12: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin customImplementation(){
    SwaggerSpringMvcPlugin mvcPlugin = new SwaggerSpringMvcPlugin(this.springSwaggerConfig);
    mvcPlugin
            .apiInfo(apiInfo())
            .ignoredParameterTypes(Authentication.class, Principal.class)
            .excludeAnnotations(new Class[]{Controller.class})
            .authorizationTypes(authTypes())
            .authorizationContext(authContext()) ;
    return mvcPlugin;
}
 
开发者ID:datenstrudel,项目名称:bulbs-core,代码行数:12,代码来源:SwaggerConfig.java

示例13: apiImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin apiImplementation(){
	
	return new SwaggerSpringMvcPlugin(this.swaggerConfig)
     		 .apiInfo(apiInfo())
     		 .pathProvider(this.pathProvider);

}
 
开发者ID:IHTSDO,项目名称:snomed-release-service,代码行数:9,代码来源:SwaggerConfig.java

示例14: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean
public SwaggerSpringMvcPlugin customImplementation() {
	return new SwaggerSpringMvcPlugin(this.springSwaggerConfig).apiInfo(apiInfo()).includePatterns("/.*");
}
 
开发者ID:janloeffler,项目名称:aws-utilization-monitor,代码行数:5,代码来源:SwaggerConfig.java

示例15: customImplementation

import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; //导入依赖的package包/类
@Bean //Don't forget the @Bean annotation
public SwaggerSpringMvcPlugin customImplementation(){
    return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
            .apiInfo(apiInfo()).apiVersion("1.0").includePatterns(".*apis.*");
}
 
开发者ID:rohitghatol,项目名称:springboot-docker-swagger,代码行数:6,代码来源:SwaggerConfig.java


注:本文中的com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。