Rename client annotations

This commit is contained in:
Dave Syer
2025-03-26 08:13:21 +00:00
parent 6bb10ab65e
commit 55bd93958a
8 changed files with 23 additions and 46 deletions

View File

@@ -21,7 +21,6 @@ import org.springframework.experimental.boot.server.exec.MavenClasspathEntry;
import org.springframework.experimental.boot.test.context.EnableDynamicProperty;
import org.springframework.experimental.boot.test.context.OAuth2ClientProviderIssuerUri;
import org.springframework.grpc.client.ChannelBuilderOptions;
import org.springframework.grpc.client.EnableGrpcClients;
import org.springframework.grpc.client.GrpcClient;
import org.springframework.grpc.client.GrpcClientRegistryCustomizer;
import org.springframework.grpc.client.interceptor.security.BearerTokenAuthenticationInterceptor;
@@ -114,8 +113,8 @@ public class GrpcServerApplicationTests {
@TestConfiguration(proxyBeanMethods = false)
@EnableDynamicProperty
@EnableGrpcClients(@GrpcClient(target = "stub",
types = { SimpleGrpc.SimpleBlockingStub.class, ServerReflectionGrpc.ServerReflectionStub.class }))
@GrpcClient(target = "stub",
types = { SimpleGrpc.SimpleBlockingStub.class, ServerReflectionGrpc.ServerReflectionStub.class })
static class ExtraConfiguration {
private String token;

View File

@@ -7,7 +7,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.grpc.client.EnableGrpcClients;
import org.springframework.grpc.client.GrpcClient;
import org.springframework.grpc.sample.proto.HelloReply;
import org.springframework.grpc.sample.proto.HelloRequest;
@@ -47,7 +46,7 @@ public class GrpcServerApplicationTests {
}
@TestConfiguration
@EnableGrpcClients(@GrpcClient(types = ReactorSimpleGrpc.ReactorSimpleStub.class))
@GrpcClient(types = ReactorSimpleGrpc.ReactorSimpleStub.class)
static class ExtraConfiguration {
}

View File

@@ -17,7 +17,6 @@ import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.grpc.client.BlockingStubFactory;
import org.springframework.grpc.client.ChannelBuilderOptions;
import org.springframework.grpc.client.EnableGrpcClients;
import org.springframework.grpc.client.GrpcClient;
import org.springframework.grpc.client.GrpcClientRegistryCustomizer;
import org.springframework.grpc.client.interceptor.security.BasicAuthenticationInterceptor;
@@ -109,8 +108,8 @@ public class GrpcServerApplicationTests {
}
@TestConfiguration
@EnableGrpcClients(@GrpcClient(target = "stub", prefix = "unsecured",
types = { SimpleGrpc.SimpleBlockingStub.class, ServerReflectionGrpc.ServerReflectionStub.class }))
@GrpcClient(target = "stub", prefix = "unsecured",
types = { SimpleGrpc.SimpleBlockingStub.class, ServerReflectionGrpc.ServerReflectionStub.class })
static class ExtraConfiguration {
@Bean