Skip to content

Commit 3bb3ee3

Browse files
committed
Update grpc-tomcat sample
This updates the grpc-tomcat sample but leaves it disabled due to failure on startup. Signed-off-by: onobc <chris.bono@gmail.com>
1 parent f9c6b8c commit 3bb3ee3

File tree

5 files changed

+21
-19
lines changed

5 files changed

+21
-19
lines changed

samples/grpc-tomcat/build.gradle

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2-
id 'java'
3-
id 'org.springframework.boot' version '3.5.5'
4-
id 'io.spring.dependency-management' version '1.1.6'
2+
id 'java'
3+
id 'org.springframework.boot' version '4.0.0-RC1'
4+
id 'io.spring.dependency-management' version '1.1.7'
55
id 'org.graalvm.buildtools.native' version '0.10.3'
66
id 'com.google.protobuf' version '0.9.4'
77
}
@@ -28,13 +28,14 @@ dependencyManagement {
2828
}
2929

3030
dependencies {
31-
implementation 'org.springframework.grpc:spring-grpc-server-web-spring-boot-starter'
32-
implementation 'io.grpc:grpc-services'
33-
implementation 'org.springframework.boot:spring-boot-starter-actuator'
34-
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
35-
testImplementation 'org.springframework.boot:spring-boot-starter-test'
36-
testImplementation 'org.springframework.grpc:spring-grpc-test'
37-
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
31+
implementation 'org.springframework.grpc:spring-grpc-server-web-spring-boot-starter'
32+
implementation 'org.springframework.boot:spring-boot-starter-actuator'
33+
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
34+
35+
testImplementation 'org.springframework.grpc:spring-grpc-test-spring-boot-autoconfigure'
36+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
37+
38+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
3839
}
3940

4041
test {

samples/grpc-tomcat/pom.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>3.5.5</version>
9+
<version>4.0.0-RC1</version>
1010
<relativePath /> <!-- lookup parent from repository -->
1111
</parent>
1212
<groupId>org.springframework.grpc</groupId>
@@ -49,10 +49,6 @@
4949
<groupId>org.springframework.grpc</groupId>
5050
<artifactId>spring-grpc-server-web-spring-boot-starter</artifactId>
5151
</dependency>
52-
<dependency>
53-
<groupId>io.grpc</groupId>
54-
<artifactId>grpc-services</artifactId>
55-
</dependency>
5652
<dependency>
5753
<groupId>org.springframework.boot</groupId>
5854
<artifactId>spring-boot-starter-actuator</artifactId>
@@ -64,7 +60,12 @@
6460

6561
<dependency>
6662
<groupId>org.springframework.grpc</groupId>
67-
<artifactId>spring-grpc-test</artifactId>
63+
<artifactId>spring-grpc-test-spring-boot-autoconfigure</artifactId>
64+
<scope>test</scope>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.springframework.boot</groupId>
68+
<artifactId>spring-boot-starter-test</artifactId>
6869
<scope>test</scope>
6970
</dependency>
7071
</dependencies>

samples/grpc-tomcat/src/main/java/org/springframework/grpc/sample/GrpcServerApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.apache.coyote.http2.Http2Protocol;
55
import org.springframework.boot.SpringApplication;
66
import org.springframework.boot.autoconfigure.SpringBootApplication;
7-
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
7+
import org.springframework.boot.tomcat.TomcatConnectorCustomizer;
88
import org.springframework.context.annotation.Bean;
99

1010
@SpringBootApplication

samples/grpc-tomcat/src/test/java/org/springframework/grpc/sample/ListenOnTwoPortsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.junit.jupiter.api.Test;
88
import org.springframework.beans.factory.annotation.Autowired;
99
import org.springframework.boot.builder.SpringApplicationBuilder;
10+
import org.springframework.boot.grpc.test.autoconfigure.LocalGrpcPort;
1011
import org.springframework.boot.test.context.SpringBootTest;
1112
import org.springframework.boot.test.context.TestConfiguration;
1213
import org.springframework.context.annotation.Bean;
@@ -15,7 +16,6 @@
1516
import org.springframework.grpc.sample.proto.HelloReply;
1617
import org.springframework.grpc.sample.proto.HelloRequest;
1718
import org.springframework.grpc.sample.proto.SimpleGrpc;
18-
import org.springframework.grpc.test.LocalGrpcPort;
1919
import org.springframework.test.annotation.DirtiesContext;
2020

2121
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,

spring-grpc-server-web-spring-boot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</dependency>
2222
<dependency>
2323
<groupId>org.springframework.grpc</groupId>
24-
<artifactId>spring-grpc-server-spring-boot-autoconfigure</artifactId>
24+
<artifactId>spring-grpc-server-spring-boot-starter</artifactId>
2525
</dependency>
2626
<dependency>
2727
<groupId>io.grpc</groupId>

0 commit comments

Comments
 (0)