Skip to content

Commit

Permalink
refactor: merge redundant projects (#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored Feb 9, 2024
1 parent 37909d6 commit 2c5e6c1
Show file tree
Hide file tree
Showing 193 changed files with 121 additions and 147 deletions.
6 changes: 3 additions & 3 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 @@ -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 Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[![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)
Expand Down Expand Up @@ -115,7 +115,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 Down Expand Up @@ -164,7 +164,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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
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.
4 changes: 2 additions & 2 deletions docs/assets/images/server-project-setup.dot
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ digraph serversetup {

label="Server-Project"

serviceimpl [label="Service implementations", 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", 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, dir=back];

Expand All @@ -49,7 +49,7 @@ digraph serversetup {
fillColor="white";
fontcolor="gray50";

clientfield [label="Client/Stub usage", width="3", color="gray50", fontcolor="gray50",fillcolor="white", 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", color="gray50", fontcolor="gray50",fillcolor="white", 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, color="gray50"];
servicemodel:se -> clientfield[style=dashed, dir=back, color="gray50", weight=0];
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/images/server-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.
2 changes: 1 addition & 1 deletion docs/en/brave.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Spring-Cloud-Sleuth provides a few classes such as
[`SpringAwareManagedChannelBuilder`](https://javadoc.io/page/org.springframework.cloud/spring-cloud-sleuth-core/latest/org/springframework/cloud/sleuth/instrument/grpc/SpringAwareManagedChannelBuilder.html),
those classes solely exists for compatibility reasons with a different library. Do not use them with this library.
grpc-spring-boot-starter provides the same/extended functionality out of the box with the
[`GrpcChannelFactory`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-autoconfigure/latest/net/devh/boot/grpc/client/channelfactory/GrpcChannelFactory.html)
[`GrpcChannelFactory`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-starter/latest/net/devh/boot/grpc/client/channelfactory/GrpcChannelFactory.html)
and related classes. See also
[sleuth's javadoc note](https://github.com/spring-cloud/spring-cloud-sleuth/blob/59216c32f7848ec337fb68d1dbec8e87eeb6bf59/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/grpc/SpringAwareManagedChannelBuilder.java#L31-L34).

Expand Down
10 changes: 5 additions & 5 deletions docs/en/client/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ spring's `@ConfigurationProperties` mechanism.

You can find all build-in configuration properties here:

- [`GrpcChannelsProperties`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-autoconfigure/latest/net/devh/boot/grpc/client/config/GrpcChannelsProperties.html)
- [`GrpcChannelProperties`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-autoconfigure/latest/net/devh/boot/grpc/client/config/GrpcChannelProperties.html)
- [`GrpcServerProperties.Security`](https://static.javadoc.io/net.devh/grpc-client-spring-boot-autoconfigure/latest/net/devh/boot/grpc/client/config/GrpcChannelProperties.Security.html)
- [`GrpcChannelsProperties`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-starter/latest/net/devh/boot/grpc/client/config/GrpcChannelsProperties.html)
- [`GrpcChannelProperties`](https://javadoc.io/page/net.devh/grpc-client-spring-boot-starter/latest/net/devh/boot/grpc/client/config/GrpcChannelProperties.html)
- [`GrpcServerProperties.Security`](https://static.javadoc.io/net.devh/grpc-client-spring-boot-starter/latest/net/devh/boot/grpc/client/config/GrpcChannelProperties.Security.html)

If you prefer to read the sources instead, you can do so
[here](https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java#L58).
[here](https://github.com/grpc-ecosystem/grpc-spring/blob/master/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/config/GrpcChannelProperties.java#L58).

The properties for the channels are all prefixed with `grpc.client.__name__.` and `grpc.client.__name__.security.`
respectively. The channel name is taken from the `@GrpcClient("__name__")` annotation.
Expand Down Expand Up @@ -322,7 +322,7 @@ using a custom `NameResolverProvider`.
> **Note:** This can only be used to decide this on an application level and not on a per request level.
This library provides some `NameResolverProvider`s itself so you can use them as a
[reference](https://github.com/grpc-ecosystem/grpc-spring/tree/master/grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/nameresolver).
[reference](https://github.com/grpc-ecosystem/grpc-spring/tree/master/grpc-client-spring-boot-starter/src/main/java/net/devh/boot/grpc/client/nameresolver).

You can register your `NameResolverProvider` by adding it to `META-INF/services/io.grpc.NameResolverProvider` for Java's
`ServiceLoader` or adding it your spring context. If you wish to use some spring beans inside your `NameResolver`, then
Expand Down
Loading

0 comments on commit 2c5e6c1

Please sign in to comment.