@Configuration
@ConditionalOnClass(name={"org.glassfish.jersey.server.ResourceConfig","io.swagger.models.Swagger"})
@ConditionalOnBean(type="org.glassfish.jersey.server.ResourceConfig")
@AutoConfigureOrder(value=2147482647)
@AutoConfigureAfter(value=org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration.class)
@EnableConfigurationProperties(value=SwaggerConfigurationProperties.class)
public class JerseySwaggerV2AutoConfiguration
extends com.holonplatform.jaxrs.swagger.v2.internal.spring.AbstractSwaggerV2AutoConfiguration<org.glassfish.jersey.server.ResourceConfig>
This class configures API listing endpoints according to one or more API configuration definitions. An API configuration endpoint can be decalred and configured using either:
SwaggerConfig type beans (using for example the BeanConfig
implementation). The ApiConfiguration annotation can be used on each API configuration bean to setup the API
listing endpoint, for example to declare the JAX-RS endpoint path. When more then one SwaggerConfig
type bean is declared, the ApiConfiguration.contextId() attribute should be used to declare a different API
context id for each configuration.SwaggerConfig type bean is defined, the SwaggerConfigurationProperties application
properties can be used to configure the API definition and the API listing endpoints. To declare more than one API
definition subset, a set of API group can be declared. Each group id will be used as API context id.
By default, the ApiDefaults.DEFAULT_API_ENDPOINT_PATH path is used as JAX-RS API listing endpoint path if not
configured otherwise.
A Jersey ResourceConfig type bean must be available in context to enable the API listing endpoints
auto-configuration.
| Constructor and Description |
|---|
JerseySwaggerV2AutoConfiguration(SwaggerConfigurationProperties configurationProperties,
org.springframework.beans.factory.ObjectProvider<io.swagger.config.SwaggerConfig> apiConfigurations) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.boot.autoconfigure.jersey.ResourceConfigCustomizer |
jerseySwaggerV2ResourceConfigCustomizer() |
getContextIdByPath, jaxrsApiEndpointsDefinitionsV2InitializerApplicationListenerOnContextRefreshpublic JerseySwaggerV2AutoConfiguration(SwaggerConfigurationProperties configurationProperties, org.springframework.beans.factory.ObjectProvider<io.swagger.config.SwaggerConfig> apiConfigurations)
Copyright © 2019 The Holon Platform. All rights reserved.