Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix-GrpcClientBeanP…
Browse files Browse the repository at this point in the history
…ostProcessor
  • Loading branch information
SOOHYUN-LIM committed Apr 23, 2024
2 parents e797998 + cbbef18 commit 020170f
Show file tree
Hide file tree
Showing 224 changed files with 4,654 additions and 241 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v3

- name: Set up java ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
Expand All @@ -30,13 +30,13 @@ jobs:
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

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: --scan --stacktrace --warning-mode=all build

- name: Deploy with Gradle
if: ${{ matrix.java == '17' }}
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: --scan publish -x check -Psigning.gnupg.executable=gpg -Psigning.gnupg.keyName=${{ secrets.GPG_NAME }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSWORD }}
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ jobs:
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v3

- name: Set up java ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
check-latest: true

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: --scan --stacktrace --warning-mode=all build

# Avoid publish errors when upgrading gradle version and dependencyManager plugin
- name: Try publishToMavenLocal
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
arguments: publishToMavenLocal
20 changes: 10 additions & 10 deletions README-zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![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)

[![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)
[![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)

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

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

## 版本

最新版本是 `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) 中可以找到所有版本及其相应的库版本的概览。
最新版本是 `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) 中可以找到所有版本及其相应的库版本的概览。

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

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

使用 Gradle 添加依赖:

````gradle
dependencies {
implementation 'net.devh:grpc-spring-boot-starter:2.15.0.RELEASE'
implementation 'net.devh:grpc-spring-boot-starter:3.1.0.RELEASE'
}
````

Expand All @@ -74,15 +74,15 @@ dependencies {
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-server-spring-boot-starter</artifactId>
<version>2.15.0.RELEASE</version>
<version>3.1.0.RELEASE</version>
</dependency>
````

使用 Gradle 添加依赖项:

````gradle
dependencies {
implementation 'net.devh:grpc-server-spring-boot-starter:2.15.0.RELEASE'
implementation 'net.devh:grpc-server-spring-boot-starter:3.1.0.RELEASE'
}
````

Expand All @@ -102,7 +102,7 @@ public class GrpcServerService extends GreeterGrpc.GreeterImplBase {
}
````

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

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

Expand All @@ -114,15 +114,15 @@ public class GrpcServerService extends GreeterGrpc.GreeterImplBase {
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-client-spring-boot-starter</artifactId>
<version>2.15.0.RELEASE</version>
<version>3.1.0.RELEASE</version>
</dependency>
````

使用 Gradle 添加依赖项:

````gradle
dependencies {
compile 'net.devh:grpc-client-spring-boot-starter:2.15.0.RELEASE'
compile 'net.devh:grpc-client-spring-boot-starter:3.1.0.RELEASE'
}
````

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

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

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

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

Expand Down
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# Survey - gRPC/Spring

Dear gRPC/Spring users, in order to enhance the user experience of
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
establishing a direct line of communication. Your feedback is highly appreciated.

# gRPC Spring Boot Starter

[![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)

[![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)
[![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)

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

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

## Features

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

## Versions

The latest version is `2.15.0.RELEASE` it was compiled with spring-boot `2.7.16` and spring-cloud `2021.0.8`
The latest version is `3.1.0.RELEASE` it was compiled with spring-boot `3.2.4` and spring-cloud `2023.0.0`
but it is also compatible with a large variety of other versions.
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).

Expand All @@ -66,15 +72,15 @@ To add a dependency using Maven, use the following:
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-spring-boot-starter</artifactId>
<version>2.15.0.RELEASE</version>
<version>3.1.0.RELEASE</version>
</dependency>
````

To add a dependency using Gradle:

````gradle
dependencies {
implementation 'net.devh:grpc-spring-boot-starter:2.15.0.RELEASE'
implementation 'net.devh:grpc-spring-boot-starter:3.1.0.RELEASE'
}
````

Expand All @@ -86,15 +92,15 @@ To add a dependency using Maven, use the following:
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-server-spring-boot-starter</artifactId>
<version>2.15.0.RELEASE</version>
<version>3.1.0.RELEASE</version>
</dependency>
````

To add a dependency using Gradle:

````gradle
dependencies {
implementation 'net.devh:grpc-server-spring-boot-starter:2.15.0.RELEASE'
implementation 'net.devh:grpc-server-spring-boot-starter:3.1.0.RELEASE'
}
````

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

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

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

To add a dependency using Gradle:

````gradle
dependencies {
compile 'net.devh:grpc-client-spring-boot-starter:2.15.0.RELEASE'
compile 'net.devh:grpc-client-spring-boot-starter:3.1.0.RELEASE'
}
````

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

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

Refer to our [documentation](https://yidongnan.github.io/grpc-spring-boot-starter/) for more details.
Expand Down
32 changes: 16 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,43 @@ buildscript {
}
}
ext {
projectVersion = '3.0.0-SNAPSHOT'
projectVersion = '3.1.0.RELEASE'

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

// https://github.com/google/guava/releases
guavaVersion = '32.1.2-jre'
guavaVersion = '33.1.0-jre'
// https://github.com/protocolbuffers/protobuf/releases
protobufVersion = '3.24.3'
protobufVersion = '3.25.3'
protobufGradlePluginVersion = '0.9.4'

// https://github.com/spring-projects/spring-boot/releases
springBootVersion = '3.1.4'
springBootVersion = '3.2.5'
// https://github.com/spring-cloud/spring-cloud-release/releases
springCloudVersion = '2022.0.4'
springCloudVersion = '2023.0.0'
// https://github.com/alibaba/spring-cloud-alibaba/releases
springCloudAlibabaNacosVersion = '2021.1'
springCloudAlibabaNacosVersion = '2022.0.0.0'

lombokPluginVersion = '8.4'
versioningPluginVersion = '3.0.0'
versionsPluginVersion = '0.49.0'
lombokPluginVersion = '8.6'
versioningPluginVersion = '3.1.0'
versionsPluginVersion = '0.51.0'

// https://github.com/JetBrains/kotlin/releases
kotlinVersion = "1.8.22"
kotlinVersion = "1.9.23"
}
}

plugins {
id 'java'
id 'java-library'
id 'org.springframework.boot' version "${springBootVersion}" apply false
id 'io.spring.dependency-management' version '1.1.3'
id 'io.spring.dependency-management' version '1.1.4'
id 'net.nemerosa.versioning' version "${versioningPluginVersion}"
id 'com.google.protobuf' version "${protobufGradlePluginVersion}"
id 'io.freefair.lombok' version "${lombokPluginVersion}" apply false
id 'com.github.ben-manes.versions' version "${versionsPluginVersion}" // gradle dependencyUpdates
id 'com.diffplug.spotless' version '6.22.0'
id 'com.diffplug.spotless' version '6.25.0'
id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}" apply false
}

Expand All @@ -61,7 +61,7 @@ if (hasProperty('buildScan')) {
wrapper {
// Update using:
// ./gradlew wrapper --gradle-version=8.4 --distribution-type=bin
gradleVersion = '8.4'
gradleVersion = '8.7'
}

def buildTimeAndDate = OffsetDateTime.now()
Expand Down Expand Up @@ -181,7 +181,7 @@ allprojects { project ->
mavenBom "com.google.protobuf:protobuf-bom:${protobufVersion}"
mavenBom "com.google.guava:guava-bom:${guavaVersion}"
mavenBom "io.grpc:grpc-bom:${grpcVersion}"
mavenBom "org.junit:junit-bom:5.10.0"
mavenBom "org.junit:junit-bom:5.10.2"
mavenBom "org.jetbrains.kotlin:kotlin-bom:${kotlinVersion}"
}
}
Expand Down Expand Up @@ -217,7 +217,7 @@ allprojects { project ->
}
}

if (project.name == 'grpc-common-spring-boot' || project.name == 'grpc-client-spring-boot-autoconfigure' || project.name == 'grpc-server-spring-boot-autoconfigure') {
if (project.name == 'grpc-common-spring-boot' || project.name == 'grpc-client-spring-boot-starter' || project.name == 'grpc-server-spring-boot-starter') {
java {
registerFeature('optionalSupport') {
usingSourceSet(sourceSets.main)
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/images/client-project-setup.dot
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ digraph serversetup {
fillColor="white";
fontcolor="gray50";

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"];
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"];

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

Expand All @@ -49,7 +49,7 @@ digraph serversetup {

label="Client-Projects";

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"];
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"];

servicemodel:se -> clientfield[style=dashed, dir=back];
servicemodel:se -> clientfield[style=dashed, dir=back, weight=0];
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/images/client-project-setup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 020170f

Please sign in to comment.