Skip to content

Commit c8dc1a5

Browse files
author
jvmlet
committed
Merge remote-tracking branch 'origin/master'
2 parents 3621595 + 670042a commit c8dc1a5

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
.gradle
1+
.*
22
build/
33
gradle-app.setting
44
!gradle-wrapper.jar
55
.gradletasknamecache
66
.idea
7-
*.iml
7+
*.iml
8+
bin/

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apply plugin: 'idea'
22
buildscript {
33
ext {
4-
springBootVersion = '1.3.6.RELEASE'
5-
grpcVersion = '1.0.0-pre2' //0.15.0
4+
springBootVersion = '1.4.0.RELEASE'
5+
grpcVersion = '1.0.0'
66
}
77
repositories {
88
mavenCentral()
@@ -13,7 +13,7 @@ buildscript {
1313
dependencies {
1414
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
1515
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5"
16-
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.7'
16+
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0'
1717
classpath group: 'com.netflix.nebula', name: 'nebula-project-plugin', version: '2.2.1'
1818
classpath group: 'com.netflix.nebula', name: 'nebula-interactive', version: '2.0.+'
1919
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0"

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version=0.0.5-SNAPSHOT
1+
version=0.0.6-SNAPSHOT
22
group=org.lognet
33
description=Spring Boot starter for Google RPC.
44
gitHubUrl=https\://github.com/LogNet/grpc-spring-boot-starter
55
bintrayUser=secured
6-
bintrayApiKey=secured
6+
bintrayApiKey=secured

grpc-spring-boot-starter-demo/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ clean.dependsOn cleanProtoGen
5555

5656
dependencyManagement {
5757
imports {
58-
mavenBom 'org.springframework.cloud:spring-cloud-starter-parent:Brixton.SR3'
58+
mavenBom "org.springframework.boot:spring-boot-starter-parent:${springBootVersion}"
5959
}
6060
}
6161

grpc-spring-boot-starter-demo/src/main/java/org/lognet/springboot/grpc/demo/GreeterApp.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package org.lognet.springboot.grpc.demo;
22

33

4-
import io.grpc.examples.GreeterGrpc;
5-
import io.grpc.examples.GreeterOuterClass;
6-
import io.grpc.stub.StreamObserver;
74
import org.lognet.springboot.grpc.GRpcService;
85
import org.springframework.boot.SpringApplication;
96
import org.springframework.boot.autoconfigure.SpringBootApplication;
107

8+
import io.grpc.examples.GreeterGrpc;
9+
import io.grpc.examples.GreeterOuterClass;
10+
import io.grpc.stub.StreamObserver;
11+
1112
/**
1213
* Created by alexf on 28-Jan-16.
1314
*/
@@ -29,5 +30,6 @@ public void sayHello(GreeterOuterClass.HelloRequest request, StreamObserver<Gree
2930
public static void main(String[] args) {
3031
SpringApplication.run(GreeterApp.class,args);
3132
}
33+
3234
}
3335

grpc-spring-boot-starter-demo/src/main/protoGen/io/grpc/examples/GreeterGrpc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* </pre>
2222
*/
2323
@javax.annotation.Generated(
24-
value = "by gRPC proto compiler (version 1.0.0-pre2)",
24+
value = "by gRPC proto compiler (version 1.0.0)",
2525
comments = "Source: greeter.proto")
2626
public class GreeterGrpc {
2727

grpc-spring-boot-starter-demo/src/test/java/org/lognet/springboot/grpc/GreeterAppTest.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
package org.lognet.springboot.grpc;
22

33
import static org.junit.Assert.assertEquals;
4+
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.DEFINED_PORT;
5+
6+
import java.util.concurrent.ExecutionException;
47

58
import org.junit.After;
69
import org.junit.Before;
710
import org.junit.Test;
811
import org.junit.runner.RunWith;
912
import org.lognet.springboot.grpc.demo.GreeterApp;
10-
import org.springframework.boot.test.SpringApplicationConfiguration;
11-
import org.springframework.boot.test.TestRestTemplate;
12-
import org.springframework.boot.test.WebIntegrationTest;
13+
import org.springframework.boot.test.context.SpringBootTest;
14+
import org.springframework.boot.test.web.client.TestRestTemplate;
1315
import org.springframework.http.HttpStatus;
1416
import org.springframework.http.ResponseEntity;
15-
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
16-
17-
import java.util.concurrent.ExecutionException;
17+
import org.springframework.test.context.junit4.SpringRunner;
1818

1919
import io.grpc.ManagedChannel;
2020
import io.grpc.ManagedChannelBuilder;
@@ -24,10 +24,8 @@
2424
/**
2525
* Created by alexf on 28-Jan-16.
2626
*/
27-
@RunWith(SpringJUnit4ClassRunner.class)
28-
@SpringApplicationConfiguration(GreeterApp.class)
29-
@WebIntegrationTest
30-
27+
@RunWith(SpringRunner.class)
28+
@SpringBootTest(classes = GreeterApp.class, webEnvironment = DEFINED_PORT)
3129
public class GreeterAppTest {
3230

3331
private ManagedChannel channel;
@@ -37,7 +35,6 @@ public void setup() {
3735
channel = ManagedChannelBuilder.forAddress("localhost", 6565)
3836
.usePlaintext(true)
3937
.build();
40-
4138
}
4239

4340
@After

0 commit comments

Comments
 (0)