-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MVC Gateway Server #2949
Merged
Merged
MVC Gateway Server #2949
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as off-topic.
This comment was marked as off-topic.
First milestone sometime in August. GA release late November early December after Framework 6.1 and Boot 3.2 |
c8481f0
to
f22f1a3
Compare
d1fa032
to
e18bbc7
Compare
Includes: - FilterFunctions - HandlerFunctions - TestRestClient Fixes gh-36
Also formatting and polish
…oxyExchange Also implements GatewayServerResponse that is mutable.
This allows easier autoconfiguration.
Borrows Operation framework from Spring Boot Actuator. Discoverable predicates and filters are found via spring.factories. Currently only static methods are supported. Shortcut configuration is not yet supported.
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
Also adds add*() methods if the user just wants to add a value. See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
Adds statusCodes to fail on. See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
Renames CircuitBreakerFilterFunctions.Config to CircuitBreakerFilterFunctions.CircuitBreakerConfig. Renames RetryFilterFunctions.Config to RetryFilterFunctions.RetryConfig See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 10, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 11, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 11, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 11, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 11, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 11, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 11, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 11, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 12, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 12, 2023
Adds request attribute in CircuitBreakerFilterFunctions.circuitBreaker() for use in fallbackHeaders(). See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 12, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 12, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 12, 2023
Removes workaround in RestClientProxyExchange and ClientHttpRequestFactoryProxyExchange See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 13, 2023
This sets up the routeId filter and adds the routeId as metadata and puts the routeId in a request attribute on route() See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 13, 2023
spencergibb
added a commit
that referenced
this pull request
Jul 13, 2023
Includes and ArgumentSupplier interface that, currently, predicates can implement that will, when accessed by the ArgumentSupplierBeanPostProcessor, send an ArgumentSupplier.ArgumentSuppliedEvent() that components can listen for. In this case, the WeightCalculatorFilter needs the arguments for defined weight RequestPredicates. Also GatewayRouterFunctions.route(routeId) was enhanced to add the routeId to requests via a custom Builder and delegating RouterFunction. See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 14, 2023
Sets up a gateway attributes map in request attributes because request attributes are cleared between predicates. Added MvcUtils.getAttribute() and MvcUtils.putAttribute() to use the gateway attribute map for attributes that live across predicates. Adds BodyFilterFunctions.adaptCachedBody(). This needs to be used in conjunction with readBody(), otherwise no body will be sent downstream. See gh-2949
spencergibb
added a commit
that referenced
this pull request
Jul 14, 2023
Adds MvcUtils.cacheAndReadBody(), MvcUtils.readBody() and MvcUtils.cacheAndReadBody(). This is generalized from GatewayRequestPredicates.readBody(). See gh-2949
spencergibb
added a commit
that referenced
this pull request
Aug 16, 2023
@spencergibb - I know this has been merged, but I see in the comments that WebSocket support was not part of this deliverable. Is WebSocket support still coming? Is it something being worked on? |
It is planned. Hopefully later this year |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes gh-36
TODO:
@Shortcut(type=DEFAULT, fieldOrder="name,value", prefix="")
RequestPredicates
inGatewayRequestPredicates
to add the annotation)RouterFucntion
which delegates to a refreshable holder class.RouterFucntion
andRequestPredicate
has anaccept(Visitor)
method, butHandlerFilterFunction
does not.Java DSL impl that overcomes globalfilter()
method for eachroute()
defined in a builder.andOther()
works.GatewayRouterFunctions.route(routeId)
Predicates
EnumeratedDistribution
Header filters
TODO: Basic Filters
TODO: Advanced Filters
TODO: Things that might be sharable