diff --git a/spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroupConfigurer.java b/spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroupConfigurer.java index 92f22a15c379..f534a5163155 100644 --- a/spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroupConfigurer.java +++ b/spring-web/src/main/java/org/springframework/web/service/registry/HttpServiceGroupConfigurer.java @@ -20,6 +20,7 @@ import java.util.function.Consumer; import java.util.function.Predicate; +import org.springframework.core.Ordered; import org.springframework.web.service.invoker.HttpServiceProxyFactory; /** @@ -31,7 +32,7 @@ * @param the type of client builder, i.e. {@code RestClient} or {@code WebClient} builder. */ @FunctionalInterface -public interface HttpServiceGroupConfigurer { +public interface HttpServiceGroupConfigurer extends Ordered { /** * Configure the underlying infrastructure for all group. @@ -39,6 +40,15 @@ public interface HttpServiceGroupConfigurer { void configureGroups(Groups groups); + /** + * Determine this configurer's order in the set of instantiated configurers. + *

The default implementation returns {@link #LOWEST_PRECEDENCE}. + */ + @Override + default int getOrder() { + return Ordered.LOWEST_PRECEDENCE; + } + /** * Contract to help iterate and configure the set of groups. * @param the type of client builder, i.e. {@code RestClient} or {@code WebClient} builder.