-
Notifications
You must be signed in to change notification settings - Fork 5
io microsphere spring cloud gateway server webflux annotation ConditionalOnGatewayAvailable
github-actions[bot] edited this page Jul 9, 2026
·
1 revision
Type: Annotation | Module: microsphere-spring-cloud-gateway-server-webflux | Package: io.microsphere.spring.cloud.gateway.server.webflux.annotation | Since: 1.0.0
Indicates that the annotated element is only available when Spring Cloud Gateway is available.
{@code
### Declaration
```java
public @interface ConditionalOnGatewayAvailable
```
## Version Information
- **Introduced in:** `1.0.0`
- **Current Project Version:** `0.2.14-SNAPSHOT`
## Version Compatibility
This component is tested and compatible with the following Java versions:
| Java Version | Status |
|:---:|:---:|
| Java 17 | ✅ Compatible |
| Java 21 | ✅ Compatible |
| Java 25 | ✅ Compatible |
## Examples
### Example 1
```java
@Configuration
@ConditionalOnGatewayAvailable
public class MyGatewayConfig {
// ...
}
```
### Example 2
```java
@Bean
@ConditionalOnGatewayAvailable
public MyCustomFilter myCustomFilter() {
return new MyCustomFilter();
}
```
## Usage
### Maven Dependency
Add the following dependency to your `pom.xml`:
```xml
io.github.microsphere-projects
microsphere-spring-cloud-gateway-server-webflux
${microsphere-gateway.version}
```
> **Tip:** Use the BOM (`microsphere-gateway-dependencies`) for consistent version management. See the [Getting Started](https://github.com/microsphere-projects/microsphere-gateway#getting-started) guide.
### Import
```java
import io.microsphere.spring.cloud.gateway.server.webflux.annotation.ConditionalOnGatewayAvailable;
```
## See Also
- `ConditionalOnGatewayEnabled`
- `ConditionalOnProperty`
- `ConditionalOnClass`
- `org.springframework.cloud.gateway.config.GatewayProperties`
---
*This documentation was auto-generated from the source code of [microsphere-gateway](https://github.com/microsphere-projects/microsphere-gateway).*
spring-cloud-gateway-commons
- CommonConstants
- CommonsPropertyConstants
- ConditionalOnMicrosphereGatewayEnabled
- ConditionalOnMicrosphereWebEndpointMappingEnabled
- ConfigUtils
- RouteConstants
- WebEndpointConfig
- WebEndpointConfigurationPropertiesBindListener
spring-cloud-gateway-server-webflux
- CachingFilteringWebHandler
- ConditionalOnGatewayAvailable
- ConditionalOnGatewayEnabled
- DefaultGatewayFilterChain
- DisabledHeartbeatEventRouteRefreshListenerInterceptor
- FilteringWebHandlerBeanDefinitionRegistryPostProcessor
- GatewayAutoConfiguration
- GatewayPropertyConstants
- GatewayUtils
- PropagatingRefreshRoutesEventApplicationListener
- WebEndpointApplicationContextInitializer
- WebEndpointMappingGatewayAutoConfiguration
- WebEndpointMappingGlobalFilter
spring-cloud-gateway-server-webmvc