Skip to content

io microsphere spring webflux function server RequestPredicateKind

github-actions[bot] edited this page Jun 18, 2026 · 18 revisions

RequestPredicateKind

Type: Enum | Module: microsphere-spring-webflux | Package: io.microsphere.spring.webflux.function.server | Since: 1.0.0

Source: microsphere-spring-webflux/src/main/java/io/microsphere/spring/webflux/function/server/RequestPredicateKind.java

Overview

The kind of RequestPredicate implementation

Declaration

public enum RequestPredicateKind

Author: Mercy

Version Information

  • Introduced in: 1.0.0
  • Current Project Version: 0.2.27-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

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-spring-webflux</artifactId>
    <version>${microsphere-spring.version}</version>
</dependency>

Tip: Use the BOM (microsphere-spring-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.spring.webflux.function.server.RequestPredicateKind;

API Reference

Public Methods

Method Description
parseRequestPredicate
toExpression Converts the given RequestPredicate into its string expression representation.
valueOf Resolves the RequestPredicateKind from the given RequestPredicate

Method Details

toExpression

public static String toExpression(RequestPredicate predicate)

Converts the given RequestPredicate into its string expression representation.

This method is the inverse of #parseRequestPredicate(String). It takes a RequestPredicate and generates a string expression that represents the predicate. The generated expression can be used to recreate the same predicate using #parseRequestPredicate(String).

Example Usage

  • "GET" - represents a method predicate for GET requests
  • "/users" - represents a path predicate for /users
  • "*.json" - represents a path extension predicate for .json files
  • "?name=value" - represents a query parameter predicate
  • "Accept: application/json" - represents an accept header predicate
  • "Content-Type: application/json" - represents a content type header predicate
  • "(GET && /users)" - represents a compound AND predicate
  • "(GET || POST)" - represents a compound OR predicate
  • "!GET" - represents a negated predicate

valueOf

public static RequestPredicateKind valueOf(RequestPredicate predicate)

Resolves the RequestPredicateKind from the given RequestPredicate

See Also

  • RequestPredicates
  • RequestPredicates#path(String)
  • RequestPredicates#pathExtension(String)
  • RequestPredicates#method(HttpMethod)
  • RequestPredicates#queryParam(String, String)
  • RequestPredicates#accept(MediaType...)
  • RequestPredicates#contentType(MediaType...)
  • RequestPredicate#and(RequestPredicate)
  • RequestPredicate#or(RequestPredicate)
  • RequestPredicate#negate()
  • RequestPredicate#nest(ServerRequest)
  • RequestPredicate

This documentation was auto-generated from the source code of microsphere-spring.

Home

spring-context

spring-guice

spring-jdbc

spring-test

spring-web

spring-webflux

spring-webmvc

Clone this wiki locally