From e91ab31bda7db69f0820a9b15226356af203c4c5 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Fri, 19 Apr 2024 18:25:13 +0800 Subject: [PATCH 1/4] Start development of 3.2.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0944fb4fb..3e6b410c2 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { } } ext { - projectVersion = '3.1.0.RELEASE' + projectVersion = '3.2.0-SNAPSHOT' // https://github.com/grpc/grpc-java/releases grpcVersion = '1.63.0' From 5f1a7a52ed027d2b57eed2cb3ca3fb1e61b77f19 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Fri, 19 Apr 2024 18:32:35 +0800 Subject: [PATCH 2/4] Supports building with Java 21 --- .github/workflows/build-master.yml | 2 +- .github/workflows/pull-request.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-master.yml b/.github/workflows/build-master.yml index b61356a86..a60d52f76 100644 --- a/.github/workflows/build-master.yml +++ b/.github/workflows/build-master.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['17'] + java: ['17', '21'] steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8d457d62f..80959b1b4 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['17'] + java: ['17', '21'] steps: - name: Checkout code uses: actions/checkout@v4 From f141a8c98081ef09d8fa428ed64e3a6dce7223a8 Mon Sep 17 00:00:00 2001 From: "shalk(xiao kun)" Date: Tue, 30 Apr 2024 19:57:39 +0800 Subject: [PATCH 3/4] fix miss in-process --- .../GrpcClientAutoConfiguration.java | 43 ++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java b/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java index 904ec9357..95e4a75f9 100644 --- a/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java +++ b/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java @@ -143,13 +143,13 @@ List defaultChannelConfigurers() { return Collections.emptyList(); } - // First try the shaded netty channel factory + // First try the shaded netty channel factory and in process factory @ConditionalOnMissingBean(GrpcChannelFactory.class) @ConditionalOnClass(name = {"io.grpc.netty.shaded.io.netty.channel.Channel", - "io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder"}) + "io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder", "io.grpc.inprocess.InProcessChannelBuilder"}) @Bean @Lazy - GrpcChannelFactory shadedNettyGrpcChannelFactory( + GrpcChannelFactory inProcessOrShadedNettyGrpcChannelFactory( final GrpcChannelsProperties properties, final GlobalClientInterceptorRegistry globalClientInterceptorRegistry, final List channelConfigurers) { @@ -162,12 +162,13 @@ GrpcChannelFactory shadedNettyGrpcChannelFactory( return new InProcessOrAlternativeChannelFactory(properties, inProcessChannelFactory, channelFactory); } - // Then try the normal netty channel factory + // Then try the normal netty channel factory and in process factory @ConditionalOnMissingBean(GrpcChannelFactory.class) - @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyChannelBuilder"}) + @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyChannelBuilder", + "io.grpc.inprocess.InProcessChannelBuilder"}) @Bean @Lazy - GrpcChannelFactory nettyGrpcChannelFactory( + GrpcChannelFactory inProcessOrNettyGrpcChannelFactory( final GrpcChannelsProperties properties, final GlobalClientInterceptorRegistry globalClientInterceptorRegistry, final List channelConfigurers) { @@ -180,8 +181,38 @@ GrpcChannelFactory nettyGrpcChannelFactory( return new InProcessOrAlternativeChannelFactory(properties, inProcessChannelFactory, channelFactory); } + // Then try the shaded netty channel factory + @ConditionalOnMissingBean(GrpcChannelFactory.class) + @ConditionalOnClass(name = {"io.grpc.netty.shaded.io.netty.channel.Channel", + "io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder"}) + @Bean + @Lazy + GrpcChannelFactory shadedNettyGrpcChannelFactory( + final GrpcChannelsProperties properties, + final GlobalClientInterceptorRegistry globalClientInterceptorRegistry, + final List channelConfigurers) { + + log.info("Detected grpc-netty-shaded: Creating ShadedNettyChannelFactory"); + return new ShadedNettyChannelFactory(properties, globalClientInterceptorRegistry, channelConfigurers); + } + + // Then try the normal netty channel factory + @ConditionalOnMissingBean(GrpcChannelFactory.class) + @ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyChannelBuilder"}) + @Bean + @Lazy + GrpcChannelFactory nettyGrpcChannelFactory( + final GrpcChannelsProperties properties, + final GlobalClientInterceptorRegistry globalClientInterceptorRegistry, + final List channelConfigurers) { + + log.info("Detected grpc-netty: Creating NettyChannelFactory"); + return new NettyChannelFactory(properties, globalClientInterceptorRegistry, channelConfigurers); + } + // Finally try the in process channel factory @ConditionalOnMissingBean(GrpcChannelFactory.class) + @ConditionalOnClass(name = {"io.grpc.inprocess.InProcessChannelBuilder"}) @Bean @Lazy GrpcChannelFactory inProcessGrpcChannelFactory( From 282037859296b28466130116e67697707e9d4d49 Mon Sep 17 00:00:00 2001 From: Ander Ruiz Ayesta Date: Tue, 9 Jul 2024 02:04:48 +0200 Subject: [PATCH 4/4] Update deploy.gradle to fix repos --- deploy.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy.gradle b/deploy.gradle index afb3f4480..f70c768e7 100644 --- a/deploy.gradle +++ b/deploy.gradle @@ -27,7 +27,7 @@ publishing { pom { name = 'gRPC Spring Boot Starter' description = 'gRPC Spring Boot Starter' - url = 'https://github.com/yidongnan/grpc-spring-boot-starter' + url = 'https://github.com/grpc-ecosystem/grpc-spring' licenses { license { name = 'Apache 2.0' @@ -50,9 +50,9 @@ publishing { } } scm { - connection = 'scm:git:git://github.com/yidongnan/grpc-spring-boot-starter.git' - developerConnection = 'scm:git:ssh@github.com:yidongnan/grpc-spring-boot-starter.git' - url = 'https://github.com/yidongnan/grpc-spring-boot-starter' + connection = 'scm:git:git://github.com/grpc-ecosystem/grpc-spring.git' + developerConnection = 'scm:git:ssh@github.com/grpc-ecosystem/grpc-spring.git' + url = 'https://github.com/grpc-ecosystem/grpc-spring' } }