Skip to content

Commit c1b1ced

Browse files
authored
Merge branch 'master' into feature/deadline_property
2 parents da2f32c + 48073ab commit c1b1ced

File tree

5 files changed

+44
-13
lines changed

5 files changed

+44
-13
lines changed

.github/workflows/build-master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
java: ['17']
14+
java: ['17', '21']
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v4

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
java: ['17']
11+
java: ['17', '21']
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v4

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99
}
1010
ext {
11-
projectVersion = '3.1.0.RELEASE'
11+
projectVersion = '3.2.0-SNAPSHOT'
1212

1313
// https://github.com/grpc/grpc-java/releases
1414
grpcVersion = '1.63.0'

deploy.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ publishing {
2727
pom {
2828
name = 'gRPC Spring Boot Starter'
2929
description = 'gRPC Spring Boot Starter'
30-
url = 'https://github.com/yidongnan/grpc-spring-boot-starter'
30+
url = 'https://github.com/grpc-ecosystem/grpc-spring'
3131
licenses {
3232
license {
3333
name = 'Apache 2.0'
@@ -50,9 +50,9 @@ publishing {
5050
}
5151
}
5252
scm {
53-
connection = 'scm:git:git://github.com/yidongnan/grpc-spring-boot-starter.git'
54-
developerConnection = 'scm:git:[email protected]:yidongnan/grpc-spring-boot-starter.git'
55-
url = 'https://github.com/yidongnan/grpc-spring-boot-starter'
53+
connection = 'scm:git:git://github.com/grpc-ecosystem/grpc-spring.git'
54+
developerConnection = 'scm:git:[email protected]/grpc-ecosystem/grpc-spring.git'
55+
url = 'https://github.com/grpc-ecosystem/grpc-spring'
5656
}
5757
}
5858

grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/autoconfigure/GrpcClientAutoConfiguration.java

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ List<GrpcChannelConfigurer> defaultChannelConfigurers() {
143143
return Collections.emptyList();
144144
}
145145

146-
// First try the shaded netty channel factory
146+
// First try the shaded netty channel factory and in process factory
147147
@ConditionalOnMissingBean(GrpcChannelFactory.class)
148148
@ConditionalOnClass(name = {"io.grpc.netty.shaded.io.netty.channel.Channel",
149-
"io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder"})
149+
"io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder", "io.grpc.inprocess.InProcessChannelBuilder"})
150150
@Bean
151151
@Lazy
152-
GrpcChannelFactory shadedNettyGrpcChannelFactory(
152+
GrpcChannelFactory inProcessOrShadedNettyGrpcChannelFactory(
153153
final GrpcChannelsProperties properties,
154154
final GlobalClientInterceptorRegistry globalClientInterceptorRegistry,
155155
final List<GrpcChannelConfigurer> channelConfigurers) {
@@ -162,12 +162,13 @@ GrpcChannelFactory shadedNettyGrpcChannelFactory(
162162
return new InProcessOrAlternativeChannelFactory(properties, inProcessChannelFactory, channelFactory);
163163
}
164164

165-
// Then try the normal netty channel factory
165+
// Then try the normal netty channel factory and in process factory
166166
@ConditionalOnMissingBean(GrpcChannelFactory.class)
167-
@ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyChannelBuilder"})
167+
@ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyChannelBuilder",
168+
"io.grpc.inprocess.InProcessChannelBuilder"})
168169
@Bean
169170
@Lazy
170-
GrpcChannelFactory nettyGrpcChannelFactory(
171+
GrpcChannelFactory inProcessOrNettyGrpcChannelFactory(
171172
final GrpcChannelsProperties properties,
172173
final GlobalClientInterceptorRegistry globalClientInterceptorRegistry,
173174
final List<GrpcChannelConfigurer> channelConfigurers) {
@@ -180,8 +181,38 @@ GrpcChannelFactory nettyGrpcChannelFactory(
180181
return new InProcessOrAlternativeChannelFactory(properties, inProcessChannelFactory, channelFactory);
181182
}
182183

184+
// Then try the shaded netty channel factory
185+
@ConditionalOnMissingBean(GrpcChannelFactory.class)
186+
@ConditionalOnClass(name = {"io.grpc.netty.shaded.io.netty.channel.Channel",
187+
"io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder"})
188+
@Bean
189+
@Lazy
190+
GrpcChannelFactory shadedNettyGrpcChannelFactory(
191+
final GrpcChannelsProperties properties,
192+
final GlobalClientInterceptorRegistry globalClientInterceptorRegistry,
193+
final List<GrpcChannelConfigurer> channelConfigurers) {
194+
195+
log.info("Detected grpc-netty-shaded: Creating ShadedNettyChannelFactory");
196+
return new ShadedNettyChannelFactory(properties, globalClientInterceptorRegistry, channelConfigurers);
197+
}
198+
199+
// Then try the normal netty channel factory
200+
@ConditionalOnMissingBean(GrpcChannelFactory.class)
201+
@ConditionalOnClass(name = {"io.netty.channel.Channel", "io.grpc.netty.NettyChannelBuilder"})
202+
@Bean
203+
@Lazy
204+
GrpcChannelFactory nettyGrpcChannelFactory(
205+
final GrpcChannelsProperties properties,
206+
final GlobalClientInterceptorRegistry globalClientInterceptorRegistry,
207+
final List<GrpcChannelConfigurer> channelConfigurers) {
208+
209+
log.info("Detected grpc-netty: Creating NettyChannelFactory");
210+
return new NettyChannelFactory(properties, globalClientInterceptorRegistry, channelConfigurers);
211+
}
212+
183213
// Finally try the in process channel factory
184214
@ConditionalOnMissingBean(GrpcChannelFactory.class)
215+
@ConditionalOnClass(name = {"io.grpc.inprocess.InProcessChannelBuilder"})
185216
@Bean
186217
@Lazy
187218
GrpcChannelFactory inProcessGrpcChannelFactory(

0 commit comments

Comments
 (0)