Skip to content

Commit

Permalink
Merge pull request #68 from yidongnan/1.4.0
Browse files Browse the repository at this point in the history
release 1.4.0.RELEASE
  • Loading branch information
yidongnan authored Mar 20, 2018
2 parents a7b05a1 + 79d5367 commit ee1f2a5
Show file tree
Hide file tree
Showing 30 changed files with 140 additions and 108 deletions.
13 changes: 7 additions & 6 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ Java技术交流群:294712648 <a target="_blank" href="http://shang.qq.com/wpa
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-server-spring-boot-starter</artifactId>
<version>1.3.0.RELEASE</version>
<version>1.4.0.RELEASE</version>
</dependency>
````

添加依赖如果使用的是Gradle

````
dependencies {
compile 'net.devh:grpc-server-spring-boot-starter:1.3.0.RELEASE'
compile 'net.devh:grpc-server-spring-boot-starter:1.4.0.RELEASE'
}
````

Expand All @@ -58,8 +58,8 @@ public class GrpcServerService extends GreeterGrpc.GreeterImplBase {
设置 gRPC 的 host 跟 port 在application.properties,默认的监听的 host 是 0.0.0.0,默认的 port 是 9090

````
grpc.server.port=
grpc.server.address=
grpc.server.port=9090
grpc.server.address=0.0.0.0
````

### gRPC 客户端
Expand All @@ -70,15 +70,15 @@ grpc.server.address=
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-client-spring-boot-starter</artifactId>
<version>1.3.0.RELEASE</version>
<version>1.4.0.RELEASE</version>
</dependency>
````

添加依赖如果使用的是Gradle

````
dependencies {
compile 'net.devh:grpc-client-spring-boot-starter:1.3.0.RELEASE'
compile 'net.devh:grpc-client-spring-boot-starter:1.4.0.RELEASE'
}
````

Expand Down Expand Up @@ -109,6 +109,7 @@ grpc.client.(gRPC server name).port[0]=
| Project Version | gRPC-java Version |
| ---------------- | ------------------ |
| 1.4.0.RELEASE | 1.10.0 |
| 1.3.0.RELEASE | 1.6.1 |
| 1.2.0.RELEASE | 1.3.0 |
| 1.1.1.RELEASE | 1.2.0 |
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ To add a dependency using Maven, use the following:
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-server-spring-boot-starter</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</dependency>
````

To add a dependency using Gradle:

````
dependencies {
compile 'net.devh:grpc-server-spring-boot-starter:1.3.0.RELEASE'
compile 'net.devh:grpc-server-spring-boot-starter:1.4.0.RELEASE'
}
````

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

To add a dependency using Gradle:

````
dependencies {
compile 'net.devh:grpc-client-spring-boot-starter:1.3.0-RELEASE'
compile 'net.devh:grpc-client-spring-boot-starter:1.4.0.RELEASE'
}
````

Expand All @@ -82,8 +82,8 @@ private Channel serverChannel;
set gRPC host and port in application.properties, default host is 0.0.0.0 and default port is 9090

````
grpc.server.port=
grpc.server.address=
grpc.server.port=9090
grpc.server.address=0.0.0.0
````

gRPC request
Expand All @@ -106,6 +106,7 @@ grpc.client.(gRPC server name).port[0]=
| Project Version | gRPC-java Version |
| ---------------- | ------------------ |
| 1.4.0.RELEASE | 1.10.0 |
| 1.3.0.RELEASE | 1.6.1 |
| 1.2.0.RELEASE | 1.3.0 |
| 1.1.1.RELEASE | 1.2.0 |
Expand Down
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
ext {
projectVersion = '1.3.0-RELEASE'
projectVersion = '1.4.0.RELEASE'

grpcVersion = '1.6.1'
protobufVersion = '3.3.0'
protobufGradlePluginVersion = '0.8.0'
grpcVersion = '1.10.0'
protobufVersion = '3.5.1'
protobufGradlePluginVersion = '0.8.4'

springBootVersion = '1.5.6.RELEASE'
springSleuthVersion = '1.2.4.RELEASE'
springCloudVersion = 'Dalston.SR3'
springCloudConsulVersion = '1.2.1.RELEASE'
springCloudEurekaVersion = '1.3.4.RELEASE'
springBootVersion = '1.5.10.RELEASE'
springSleuthVersion = '1.3.2.RELEASE'
springCloudVersion = 'Edgware.SR2'
springCloudConsulVersion = '1.3.2.RELEASE'
springCloudEurekaVersion = '1.4.3.RELEASE'
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE"
Expand Down Expand Up @@ -70,7 +70,7 @@ allprojects {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies{
compileOnly('org.projectlombok:lombok:1.16.6')
compileOnly('org.projectlombok:lombok:1.16.20')
}
buildscript {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions examples/cloud-eureka-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>cloud-eureka-server</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<packaging>jar</packaging>

<name>cloud-eureka-server</name>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>examples</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</parent>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions examples/cloud-grpc-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>cloud-grpc-client</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<packaging>jar</packaging>

<name>cloud-grpc-client</name>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>examples</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</parent>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions examples/cloud-grpc-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>cloud-grpc-server</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<packaging>jar</packaging>

<name>cloud-grpc-server</name>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>examples</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</parent>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions examples/cloud-zipkin-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>cloud-zipkin-server</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<packaging>jar</packaging>

<name>cloud-zipkin-server</name>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>examples</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>examples</artifactId>
<groupId>net.devh</groupId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
6 changes: 3 additions & 3 deletions examples/local-grpc-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>local-grpc-client</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<packaging>jar</packaging>

<name>local-grpc-client</name>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>examples</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</parent>

<properties>
Expand All @@ -30,7 +30,7 @@
<dependency>
<groupId>net.devh</groupId>
<artifactId>grpc-lib</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</dependency>
<dependency>
<groupId>net.devh</groupId>
Expand Down
4 changes: 2 additions & 2 deletions examples/local-grpc-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>local-grpc-server</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<packaging>jar</packaging>

<name>local-grpc-server</name>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>examples</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
</parent>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>grpc-spring-boot-starter</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<relativePath>../</relativePath>
</parent>

<artifactId>examples</artifactId>
<packaging>pom</packaging>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>

<modules>
<module>grpc-lib</module>
Expand Down
4 changes: 2 additions & 2 deletions grpc-client-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>net.devh</groupId>
<artifactId>grpc-spring-boot-starter</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>
<relativePath>../</relativePath>
</parent>

<artifactId>grpc-client-spring-boot-autoconfigure</artifactId>
<version>1.3.0-RELEASE</version>
<version>1.4.0.RELEASE</version>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package net.devh.springboot.autoconfigure.grpc.client;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;

import java.net.InetSocketAddress;
import java.util.List;
import java.util.concurrent.ExecutorService;

import javax.annotation.concurrent.GuardedBy;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;

import io.grpc.Attributes;
import io.grpc.EquivalentAddressGroup;
import io.grpc.NameResolver;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package net.devh.springboot.autoconfigure.grpc.client;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;

import org.apache.commons.collections.CollectionUtils;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;

import java.net.InetSocketAddress;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;

import javax.annotation.concurrent.GuardedBy;

import org.apache.commons.collections.CollectionUtils;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;

import io.grpc.Attributes;
import io.grpc.EquivalentAddressGroup;
import io.grpc.NameResolver;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package net.devh.springboot.autoconfigure.grpc.client;

import com.google.common.collect.Lists;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import java.util.List;
import java.util.Map;

import javax.annotation.PostConstruct;
import com.google.common.collect.Lists;

import io.grpc.ClientInterceptor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package net.devh.springboot.autoconfigure.grpc.client;

import com.google.common.collect.Maps;
import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.Map;
import com.google.common.collect.Maps;

import lombok.Data;

Expand Down
Loading

0 comments on commit ee1f2a5

Please sign in to comment.