Skip to content

Commit

Permalink
Merge branch '4.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjbaxter committed Sep 4, 2024
2 parents 91309f7 + 4333960 commit 91d8853
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

package org.springframework.cloud.client.loadbalancer.reactive;

import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang3.ArrayUtils;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
Expand All @@ -42,9 +41,9 @@ private LoadBalancerTestUtils() {
}

static ConfigurableApplicationContext init(Class<?>... configClasses) {
return new SpringApplicationBuilder().web(WebApplicationType.NONE)
.sources(ArrayUtils.add(configClasses, WebClientAutoConfiguration.class))
.run();
Class[] classes = Arrays.copyOf(configClasses, configClasses.length + 1);
classes[configClasses.length] = WebClientAutoConfiguration.class;
return new SpringApplicationBuilder().web(WebApplicationType.NONE).sources(classes).run();
}

@SuppressWarnings("unchecked")
Expand Down

0 comments on commit 91d8853

Please sign in to comment.