Skip to content

Commit 020170f

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-GrpcClientBeanPostProcessor
2 parents e797998 + cbbef18 commit 020170f

File tree

224 files changed

+4654
-241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+4654
-241
lines changed

.github/workflows/build-master.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Validate Gradle wrapper
20-
uses: gradle/wrapper-validation-action@v1
20+
uses: gradle/wrapper-validation-action@v3
2121

2222
- name: Set up java ${{ matrix.java }}
23-
uses: actions/setup-java@v3
23+
uses: actions/setup-java@v4
2424
with:
2525
distribution: 'temurin'
2626
java-version: ${{ matrix.java }}
@@ -30,13 +30,13 @@ jobs:
3030
run: openssl aes-256-cbc -K ${{ secrets.ENCRYPTED_KEY }} -iv ${{ secrets.ENCRYPTED_IV }} -in private.key.enc -out ./private.key -d && gpg --batch --import ./private.key || echo
3131

3232
- name: Build with Gradle
33-
uses: gradle/gradle-build-action@v2
33+
uses: gradle/actions/setup-gradle@v3
3434
with:
3535
arguments: --scan --stacktrace --warning-mode=all build
3636

3737
- name: Deploy with Gradle
3838
if: ${{ matrix.java == '17' }}
39-
uses: gradle/gradle-build-action@v2
39+
uses: gradle/actions/setup-gradle@v3
4040
with:
4141
arguments: --scan publish -x check -Psigning.gnupg.executable=gpg -Psigning.gnupg.keyName=${{ secrets.GPG_NAME }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSWORD }}
4242
env:

.github/workflows/pull-request.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Validate Gradle wrapper
17-
uses: gradle/wrapper-validation-action@v1
17+
uses: gradle/wrapper-validation-action@v3
1818

1919
- name: Set up java ${{ matrix.java }}
20-
uses: actions/setup-java@v3
20+
uses: actions/setup-java@v4
2121
with:
2222
distribution: temurin
2323
java-version: ${{ matrix.java }}
2424
check-latest: true
2525

2626
- name: Build with Gradle
27-
uses: gradle/gradle-build-action@v2
27+
uses: gradle/actions/setup-gradle@v3
2828
with:
2929
arguments: --scan --stacktrace --warning-mode=all build
3030

3131
# Avoid publish errors when upgrading gradle version and dependencyManager plugin
3232
- name: Try publishToMavenLocal
33-
uses: gradle/gradle-build-action@v2
33+
uses: gradle/actions/setup-gradle@v3
3434
with:
3535
arguments: publishToMavenLocal

README-zh-CN.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build master branch](https://github.com/grpc-ecosystem/grpc-spring/workflows/Build%20master%20branch/badge.svg)](https://github.com/grpc-ecosystem/grpc-spring/actions) [![Maven Central with version prefix filter](https://img.shields.io/maven-central/v/net.devh/grpc-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.devh%22%20grpc) [![License](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE) [![Crowdin](https://badges.crowdin.net/grpc-spring-boot-starter/localized.svg)](https://crowdin.com/project/grpc-spring-boot-starter)
44

5-
[![Client-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-client-spring-boot-autoconfigure.svg?label=Client-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-client-spring-boot-autoconfigure) [![Server-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-server-spring-boot-autoconfigure.svg?label=Server-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-server-spring-boot-autoconfigure) [![Common-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-common-spring-boot.svg?label=Common-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-common-spring-boot)
5+
[![Client-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-client-spring-boot-starter.svg?label=Client-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-client-spring-boot-starter) [![Server-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-server-spring-boot-starter.svg?label=Server-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-server-spring-boot-starter) [![Common-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-common-spring-boot.svg?label=Common-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-common-spring-boot)
66

77
README: [English](README.md) | [中文](README-zh-CN.md)
88

@@ -40,7 +40,7 @@ README: [English](README.md) | [中文](README-zh-CN.md)
4040

4141
## 版本
4242

43-
最新版本是 `2.15.0.RELEASE` 它能跟 Spring-Boot `2.7.16` 和 Spring-Cloud `2021.0.8` 搭配使用。 但它也与各种其他版本兼容。 我们的 [文档](https://yidongnan.github.io/grpc-spring-boot-starter/en/versions.html) 中可以找到所有版本及其相应的库版本的概览。
43+
最新版本是 `3.1.0.RELEASE` 它能跟 Spring-Boot `3.2.4` 和 Spring-Cloud `2023.0.0` 搭配使用。 但它也与各种其他版本兼容。 我们的 [文档](https://yidongnan.github.io/grpc-spring-boot-starter/en/versions.html) 中可以找到所有版本及其相应的库版本的概览。
4444

4545
**注意:** 该项目也可以在没有 Spring-Boot 的情况下使用,但是您需要手动配置一些 bean。
4646

@@ -54,15 +54,15 @@ README: [English](README.md) | [中文](README-zh-CN.md)
5454
<dependency>
5555
<groupId>net.devh</groupId>
5656
<artifactId>grpc-spring-boot-starter</artifactId>
57-
<version>2.15.0.RELEASE</version>
57+
<version>3.1.0.RELEASE</version>
5858
</dependency>
5959
````
6060

6161
使用 Gradle 添加依赖:
6262

6363
````gradle
6464
dependencies {
65-
implementation 'net.devh:grpc-spring-boot-starter:2.15.0.RELEASE'
65+
implementation 'net.devh:grpc-spring-boot-starter:3.1.0.RELEASE'
6666
}
6767
````
6868

@@ -74,15 +74,15 @@ dependencies {
7474
<dependency>
7575
<groupId>net.devh</groupId>
7676
<artifactId>grpc-server-spring-boot-starter</artifactId>
77-
<version>2.15.0.RELEASE</version>
77+
<version>3.1.0.RELEASE</version>
7878
</dependency>
7979
````
8080

8181
使用 Gradle 添加依赖项:
8282

8383
````gradle
8484
dependencies {
85-
implementation 'net.devh:grpc-server-spring-boot-starter:2.15.0.RELEASE'
85+
implementation 'net.devh:grpc-server-spring-boot-starter:3.1.0.RELEASE'
8686
}
8787
````
8888

@@ -102,7 +102,7 @@ public class GrpcServerService extends GreeterGrpc.GreeterImplBase {
102102
}
103103
````
104104

105-
默认情况下,gRPC 服务器将监听端口 `9090`。 端口的配置和其他的 [设置](grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/config/GrpcServerProperties.java) 可以通过 Spring 的属性机制进行更改。 服务端的配置使用 `grpc.server.` 前缀。
105+
默认情况下,gRPC 服务器将监听端口 `9090`。 端口的配置和其他的 [设置](grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/config/GrpcServerProperties.java) 可以通过 Spring 的属性机制进行更改。 服务端的配置使用 `grpc.server.` 前缀。
106106

107107
详情请参阅我们的[文档](https://yidongnan.github.io/grpc-spring-boot-starter/)
108108

@@ -114,15 +114,15 @@ public class GrpcServerService extends GreeterGrpc.GreeterImplBase {
114114
<dependency>
115115
<groupId>net.devh</groupId>
116116
<artifactId>grpc-client-spring-boot-starter</artifactId>
117-
<version>2.15.0.RELEASE</version>
117+
<version>3.1.0.RELEASE</version>
118118
</dependency>
119119
````
120120

121121
使用 Gradle 添加依赖项:
122122

123123
````gradle
124124
dependencies {
125-
compile 'net.devh:grpc-client-spring-boot-starter:2.15.0.RELEASE'
125+
compile 'net.devh:grpc-client-spring-boot-starter:3.1.0.RELEASE'
126126
}
127127
````
128128

@@ -145,7 +145,7 @@ HelloReply response = stub.sayHello(HelloRequest.newBuilder().setName(name).buil
145145

146146
可以单独配置每个客户端的目标地址。 但在某些情况下,您可以仅依靠默认配置。 您可以通过 `NameResolver.Factory` Bean 类自定义默认的 url 映射。 如果您没有配置那个Bean,那么默认的 uri 将使用默认方案和名称(如:`dns:<name>`):
147147

148-
这些配置和其他的 [设置](grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java) 可以通过 Spring 的属性机制进行更改。 客户端使用`grpc.client.(serverName)。` 前缀。
148+
这些配置和其他的 [设置](grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java) 可以通过 Spring 的属性机制进行更改。 客户端使用`grpc.client.(serverName)。` 前缀。
149149

150150
详情请参阅我们的[文档](https://yidongnan.github.io/grpc-spring-boot-starter/)
151151

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
# Survey - gRPC/Spring
2+
3+
Dear gRPC/Spring users, in order to enhance the user experience of
4+
grpc-ecosystem/grpc-spring, we have developed [this survey](https://docs.google.com/forms/d/e/1FAIpQLSfHgvh_Z0_wwX7JQLERanJ-AAXjiKh23_kSI3Rl5mnKVQ8Bpw/viewform?resourcekey=0-mEilI6lFvIfVXiUniEyCog) as a means of
5+
establishing a direct line of communication. Your feedback is highly appreciated.
6+
17
# gRPC Spring Boot Starter
28

39
[![Build master branch](https://github.com/grpc-ecosystem/grpc-spring/workflows/Build%20master%20branch/badge.svg)](https://github.com/grpc-ecosystem/grpc-spring/actions)
410
[![Maven Central with version prefix filter](https://img.shields.io/maven-central/v/net.devh/grpc-spring-boot-starter.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22net.devh%22%20grpc)
511
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
612
[![Crowdin](https://badges.crowdin.net/grpc-spring-boot-starter/localized.svg)](https://crowdin.com/project/grpc-spring-boot-starter)
713

8-
[![Client-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-client-spring-boot-autoconfigure.svg?label=Client-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-client-spring-boot-autoconfigure)
9-
[![Server-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-server-spring-boot-autoconfigure.svg?label=Server-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-server-spring-boot-autoconfigure)
14+
[![Client-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-client-spring-boot-starter.svg?label=Client-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-client-spring-boot-starter)
15+
[![Server-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-server-spring-boot-starter.svg?label=Server-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-server-spring-boot-starter)
1016
[![Common-Javadoc](https://www.javadoc.io/badge/net.devh/grpc-common-spring-boot.svg?label=Common-Javadoc)](https://www.javadoc.io/doc/net.devh/grpc-common-spring-boot)
1117

1218
README: [English](README.md) | [中文](README-zh-CN.md)
1319

14-
**Documentation:** [English](https://yidongnan.github.io/grpc-spring-boot-starter/en/) | [中文](https://yidongnan.github.io/grpc-spring-boot-starter/zh-CN/)
20+
**Documentation:** [English](https://grpc-ecosystem.github.io/grpc-spring/en/) | [中文](https://grpc-ecosystem.github.io/grpc-spring/zh-CN/)
1521

1622
## Features
1723

@@ -50,7 +56,7 @@ README: [English](README.md) | [中文](README-zh-CN.md)
5056

5157
## Versions
5258

53-
The latest version is `2.15.0.RELEASE` it was compiled with spring-boot `2.7.16` and spring-cloud `2021.0.8`
59+
The latest version is `3.1.0.RELEASE` it was compiled with spring-boot `3.2.4` and spring-cloud `2023.0.0`
5460
but it is also compatible with a large variety of other versions.
5561
An overview of all versions and their respective library versions can be found in our [documentation](https://yidongnan.github.io/grpc-spring-boot-starter/en/versions.html).
5662

@@ -66,15 +72,15 @@ To add a dependency using Maven, use the following:
6672
<dependency>
6773
<groupId>net.devh</groupId>
6874
<artifactId>grpc-spring-boot-starter</artifactId>
69-
<version>2.15.0.RELEASE</version>
75+
<version>3.1.0.RELEASE</version>
7076
</dependency>
7177
````
7278

7379
To add a dependency using Gradle:
7480

7581
````gradle
7682
dependencies {
77-
implementation 'net.devh:grpc-spring-boot-starter:2.15.0.RELEASE'
83+
implementation 'net.devh:grpc-spring-boot-starter:3.1.0.RELEASE'
7884
}
7985
````
8086

@@ -86,15 +92,15 @@ To add a dependency using Maven, use the following:
8692
<dependency>
8793
<groupId>net.devh</groupId>
8894
<artifactId>grpc-server-spring-boot-starter</artifactId>
89-
<version>2.15.0.RELEASE</version>
95+
<version>3.1.0.RELEASE</version>
9096
</dependency>
9197
````
9298

9399
To add a dependency using Gradle:
94100

95101
````gradle
96102
dependencies {
97-
implementation 'net.devh:grpc-server-spring-boot-starter:2.15.0.RELEASE'
103+
implementation 'net.devh:grpc-server-spring-boot-starter:3.1.0.RELEASE'
98104
}
99105
````
100106

@@ -115,7 +121,7 @@ public class GrpcServerService extends GreeterGrpc.GreeterImplBase {
115121
````
116122

117123
By default, the grpc server will listen to port `9090`. These and other
118-
[settings](grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/config/GrpcServerProperties.java)
124+
[settings](grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/config/GrpcServerProperties.java)
119125
can be changed via Spring's property mechanism. The server uses the `grpc.server.` prefix.
120126

121127
Refer to our [documentation](https://yidongnan.github.io/grpc-spring-boot-starter/) for more details.
@@ -128,15 +134,15 @@ To add a dependency using Maven, use the following:
128134
<dependency>
129135
<groupId>net.devh</groupId>
130136
<artifactId>grpc-client-spring-boot-starter</artifactId>
131-
<version>2.15.0.RELEASE</version>
137+
<version>3.1.0.RELEASE</version>
132138
</dependency>
133139
````
134140

135141
To add a dependency using Gradle:
136142

137143
````gradle
138144
dependencies {
139-
compile 'net.devh:grpc-client-spring-boot-starter:2.15.0.RELEASE'
145+
compile 'net.devh:grpc-client-spring-boot-starter:3.1.0.RELEASE'
140146
}
141147
````
142148

@@ -164,7 +170,7 @@ You can customize the default url mapping via `NameResolver.Factory` beans. If y
164170
then the default uri will be guessed using the default scheme and the name (e.g.: `dns:/<name>`):
165171

166172
These and other
167-
[settings](grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java)
173+
[settings](grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java)
168174
can be changed via Spring's property mechanism. The clients use the `grpc.client.(serverName).` prefix.
169175

170176
Refer to our [documentation](https://yidongnan.github.io/grpc-spring-boot-starter/) for more details.

build.gradle

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,43 @@ buildscript {
88
}
99
}
1010
ext {
11-
projectVersion = '3.0.0-SNAPSHOT'
11+
projectVersion = '3.1.0.RELEASE'
1212

1313
// https://github.com/grpc/grpc-java/releases
14-
grpcVersion = '1.58.0'
14+
grpcVersion = '1.63.0'
1515

1616
// https://github.com/google/guava/releases
17-
guavaVersion = '32.1.2-jre'
17+
guavaVersion = '33.1.0-jre'
1818
// https://github.com/protocolbuffers/protobuf/releases
19-
protobufVersion = '3.24.3'
19+
protobufVersion = '3.25.3'
2020
protobufGradlePluginVersion = '0.9.4'
2121

2222
// https://github.com/spring-projects/spring-boot/releases
23-
springBootVersion = '3.1.4'
23+
springBootVersion = '3.2.5'
2424
// https://github.com/spring-cloud/spring-cloud-release/releases
25-
springCloudVersion = '2022.0.4'
25+
springCloudVersion = '2023.0.0'
2626
// https://github.com/alibaba/spring-cloud-alibaba/releases
27-
springCloudAlibabaNacosVersion = '2021.1'
27+
springCloudAlibabaNacosVersion = '2022.0.0.0'
2828

29-
lombokPluginVersion = '8.4'
30-
versioningPluginVersion = '3.0.0'
31-
versionsPluginVersion = '0.49.0'
29+
lombokPluginVersion = '8.6'
30+
versioningPluginVersion = '3.1.0'
31+
versionsPluginVersion = '0.51.0'
3232

3333
// https://github.com/JetBrains/kotlin/releases
34-
kotlinVersion = "1.8.22"
34+
kotlinVersion = "1.9.23"
3535
}
3636
}
3737

3838
plugins {
3939
id 'java'
4040
id 'java-library'
4141
id 'org.springframework.boot' version "${springBootVersion}" apply false
42-
id 'io.spring.dependency-management' version '1.1.3'
42+
id 'io.spring.dependency-management' version '1.1.4'
4343
id 'net.nemerosa.versioning' version "${versioningPluginVersion}"
4444
id 'com.google.protobuf' version "${protobufGradlePluginVersion}"
4545
id 'io.freefair.lombok' version "${lombokPluginVersion}" apply false
4646
id 'com.github.ben-manes.versions' version "${versionsPluginVersion}" // gradle dependencyUpdates
47-
id 'com.diffplug.spotless' version '6.22.0'
47+
id 'com.diffplug.spotless' version '6.25.0'
4848
id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}" apply false
4949
}
5050

@@ -61,7 +61,7 @@ if (hasProperty('buildScan')) {
6161
wrapper {
6262
// Update using:
6363
// ./gradlew wrapper --gradle-version=8.4 --distribution-type=bin
64-
gradleVersion = '8.4'
64+
gradleVersion = '8.7'
6565
}
6666

6767
def buildTimeAndDate = OffsetDateTime.now()
@@ -181,7 +181,7 @@ allprojects { project ->
181181
mavenBom "com.google.protobuf:protobuf-bom:${protobufVersion}"
182182
mavenBom "com.google.guava:guava-bom:${guavaVersion}"
183183
mavenBom "io.grpc:grpc-bom:${grpcVersion}"
184-
mavenBom "org.junit:junit-bom:5.10.0"
184+
mavenBom "org.junit:junit-bom:5.10.2"
185185
mavenBom "org.jetbrains.kotlin:kotlin-bom:${kotlinVersion}"
186186
}
187187
}
@@ -217,7 +217,7 @@ allprojects { project ->
217217
}
218218
}
219219

220-
if (project.name == 'grpc-common-spring-boot' || project.name == 'grpc-client-spring-boot-autoconfigure' || project.name == 'grpc-server-spring-boot-autoconfigure') {
220+
if (project.name == 'grpc-common-spring-boot' || project.name == 'grpc-client-spring-boot-starter' || project.name == 'grpc-server-spring-boot-starter') {
221221
java {
222222
registerFeature('optionalSupport') {
223223
usingSourceSet(sourceSets.main)

docs/assets/images/client-project-setup.dot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ digraph serversetup {
3939
fillColor="white";
4040
fontcolor="gray50";
4141

42-
serviceimpl [label="Service implementations", color="gray50", fontcolor="gray50",fillcolor="white",width="3", URL="https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/service/GrpcService.java#L49", target="_blank"];
42+
serviceimpl [label="Service implementations", color="gray50", fontcolor="gray50",fillcolor="white",width="3", URL="https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/service/GrpcService.java#L49", target="_blank"];
4343

4444
servicemodel -> serviceimpl [style=dashed, color="gray50", dir=back];
4545

@@ -49,7 +49,7 @@ digraph serversetup {
4949

5050
label="Client-Projects";
5151

52-
clientfield [label="Client/Stub usage", width="3", URL="https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClient.java#L69", target="_blank"];
52+
clientfield [label="Client/Stub usage", width="3", URL="https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/inject/GrpcClient.java#L69", target="_blank"];
5353

5454
servicemodel:se -> clientfield[style=dashed, dir=back];
5555
servicemodel:se -> clientfield[style=dashed, dir=back, weight=0];

docs/assets/images/client-project-setup.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)