Class ApiVersionWebMvcAutoConfiguration
java.lang.Object
org.springframework.cloud.servicebroker.autoconfigure.web.servlet.ApiVersionWebMvcAutoConfiguration
@Configuration
@ConditionalOnWebApplication(type=SERVLET)
@ConditionalOnBean(ServiceInstanceService.class)
@ConditionalOnProperty(prefix="spring.cloud.openservicebroker",
name="api-version-check-enabled",
havingValue="true",
matchIfMissing=true)
@AutoConfigureAfter(org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration.class)
@EnableConfigurationProperties(ServiceBrokerProperties.class)
public class ApiVersionWebMvcAutoConfiguration
extends Object
Auto-configuration
for the service broker API
validation. Configures support for any service broker API version if a version is not
specifically configured.
API validation may be disabled completely by setting the following configuration property:
spring.cloud.openservicebroker.api-version-check-enabled = false
- Author:
- Benjamin Ihrig, Scott Frederick, Roy Clarkson
-
Constructor Summary
ConstructorDescriptionApiVersionWebMvcAutoConfiguration
(ServiceBrokerProperties serviceBrokerProperties) Construct a newApiVersionWebMvcAutoConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionConditionally provides aBrokerApiVersion
bean.serviceBrokerApiVersionInterceptor
(BrokerApiVersion brokerApiVersion) Provide anApiVersionInterceptor
bean.Provides aBrokerApiVersion
bean if the 'api-version' property is available in external configuration.serviceBrokerWebMvcConfigurerAdapter
(ApiVersionInterceptor apiVersionInterceptor) Provide anApiVersionWebMvcConfigurerAdapter
bean.
-
Constructor Details
-
ApiVersionWebMvcAutoConfiguration
Construct a newApiVersionWebMvcAutoConfiguration
.- Parameters:
serviceBrokerProperties
- the service broker properties
-
-
Method Details
-
serviceBrokerApiVersionProperty
@Bean @ConditionalOnMissingBean(BrokerApiVersion.class) @ConditionalOnProperty(prefix="spring.cloud.openservicebroker", name="api-version") public BrokerApiVersion serviceBrokerApiVersionProperty()Provides aBrokerApiVersion
bean if the 'api-version' property is available in external configuration.- Returns:
- the bean
-
serviceBrokerApiVersion
@Bean @ConditionalOnMissingBean(BrokerApiVersion.class) public BrokerApiVersion serviceBrokerApiVersion()Conditionally provides aBrokerApiVersion
bean.- Returns:
- the bean
-
serviceBrokerApiVersionInterceptor
@Bean public ApiVersionInterceptor serviceBrokerApiVersionInterceptor(BrokerApiVersion brokerApiVersion) Provide anApiVersionInterceptor
bean.- Parameters:
brokerApiVersion
- the api version- Returns:
- the bean
-
serviceBrokerWebMvcConfigurerAdapter
@Bean public ApiVersionWebMvcConfigurerAdapter serviceBrokerWebMvcConfigurerAdapter(ApiVersionInterceptor apiVersionInterceptor) Provide anApiVersionWebMvcConfigurerAdapter
bean.- Parameters:
apiVersionInterceptor
- the api version interceptor- Returns:
- the bean
-