Skip to content

Support instance predicate and filter methods - #4314

Open
zephyr45 wants to merge 1 commit into
spring-cloud:mainfrom
zephyr45:issue-3764-instance-method-suppliers
Open

zephyr45 wants to merge 1 commit into
spring-cloud:mainfrom
zephyr45:issue-3764-instance-method-suppliers

Conversation

@zephyr45

@zephyr45 zephyr45 commented Oct 6, 2026

Copy link
Copy Markdown

Summary

  • retain predicate and filter supplier beans as targets for discovered instance methods
  • propagate the target through normalized operations and reflective invocation while preserving static method behavior
  • add bean-factory and invocation coverage, and document instance-method suppliers

This follows the bean-plus-method technique used by Spring MVC handler mappings while retaining Gateway's existing argument conversion and external-configuration invoker.

Verification

  • ./mvnw -pl spring-cloud-gateway-server-webmvc -am -Dtest=FilterDiscovererTests,FilterBeanFactoryDiscovererTests,PredicateDiscovererTests,PredicateBeanFactoryDiscovererTests -Dsurefire.failIfNoSpecifiedTests=false test — 4 tests passed; Checkstyle reported 0 violations
  • ./mvnw -pl spring-cloud-gateway-server-webmvc -am test — 217 tests ran with 0 assertion failures; 105 Testcontainers errors because no Docker daemon is available locally

Fixes gh-3764

@zephyr45
zephyr45 force-pushed the issue-3764-instance-method-suppliers branch from 9805b5e to c707583 Compare October 6, 2026 18:27
Retain supplier bean instances as reflective operation targets so custom predicates and filters can use injected dependencies while static DSL methods continue to work.

Fixes spring-cloudgh-3764

Signed-off-by: zephyr45 <anuraaagsingh.45@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate using classes and techniques from AbstractHandlerMethodMapping

2 participants