helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.44k stars 562 forks source link

4.0.10: register routing in weighted order of Server and HTTP Features #8840

Closed barchetta closed 4 weeks ago

barchetta commented 1 month ago

Backport of #8826 to 4.0.10

Description

Correctly handle order of Server Features and HTTP Features when registering non-HTTP Feature elements to the routing.

With the updated version, all elements (filters, routes, services) are ordered depending on the feature's weight. This is achieved by creating a new HttpFeature for each Server Feature with the same weight, that collects all registrations and applies them once the HTTP Features are ordered by weight. HttpFeature registered from a Server Feature is left intact and applied on the real builder (as this already works as it should) Documentation

Documentation

This aligns with the internal documentation of feature weights.

I have added update of WebServer documentation in the latest commit.