Skip to content

Commit 213d1f9

Browse files
onobcDave Syer
authored andcommitted
Add spring-grpc-spring-boot-starter module
This commit does the following: * Adds a `spring-grpc-spring-boot-starter` module * Adjusts the scope of the dependencies in the`spring-grpc-spring-boot-autoconfigure` module to optional
1 parent 40fed81 commit 213d1f9

File tree

8 files changed

+63
-21
lines changed

8 files changed

+63
-21
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ To create a simple gRPC server, you can use the Spring Boot starter. For Maven:
1515
```xml
1616
<dependency>
1717
<groupId>org.springframework.grpc</groupId>
18-
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
18+
<artifactId>spring-grpc-spring-boot-starter</artifactId>
1919
<version>0.1.0-SNAPSHOT</version>
2020
</dependency>
2121
```
2222

2323
or for Gradle:
2424

2525
```groovy
26-
implementation 'org.springframework.grpc:spring-grpc-spring-boot-autoconfigure:0.1.0-SNAPSHOT'
26+
implementation 'org.springframework.grpc:spring-grpc-spring-boot-starter:0.1.0-SNAPSHOT'
2727
```
2828

2929
For convenience, you can use the Spring gRPC BOM to manage dependencies. With Maven:
@@ -131,4 +131,4 @@ The docs are then in the directory `spring-grpc-docs/target/antora/site/index.ht
131131
To reformat using the [java-format plugin](https://github.com/spring-io/spring-javaformat)
132132
```shell
133133
./mvnw spring-javaformat:apply
134-
```
134+
```

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<module>spring-grpc-core</module>
2020
<module>spring-grpc-test</module>
2121
<module>spring-grpc-spring-boot-autoconfigure</module>
22+
<module>spring-grpc-spring-boot-starter</module>
2223
<module>samples</module>
2324
</modules>
2425

samples/grpc-server/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencyManagement {
2929
}
3030

3131
dependencies {
32-
implementation 'org.springframework.grpc:spring-grpc-spring-boot-autoconfigure'
32+
implementation 'org.springframework.grpc:spring-grpc-spring-boot-starter'
3333
implementation 'io.grpc:grpc-services'
3434
testImplementation 'org.springframework.boot:spring-boot-starter-test'
3535
testImplementation 'org.springframework.grpc:spring-grpc-test'

samples/grpc-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<dependencies>
4848
<dependency>
4949
<groupId>org.springframework.grpc</groupId>
50-
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
50+
<artifactId>spring-grpc-spring-boot-starter</artifactId>
5151
</dependency>
5252
<dependency>
5353
<groupId>io.grpc</groupId>

spring-grpc-bom/pom.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,28 @@
2626

2727
<dependencyManagement>
2828
<dependencies>
29-
3029
<dependency>
3130
<groupId>org.springframework.grpc</groupId>
3231
<artifactId>spring-grpc-core</artifactId>
3332
<version>${project.version}</version>
3433
</dependency>
35-
36-
<!-- Utilities -->
3734
<dependency>
3835
<groupId>org.springframework.grpc</groupId>
39-
<artifactId>spring-grpc-test</artifactId>
36+
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
4037
<version>${project.version}</version>
4138
</dependency>
42-
4339
<dependency>
4440
<groupId>org.springframework.grpc</groupId>
45-
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
41+
<artifactId>spring-grpc-spring-boot-starter</artifactId>
42+
<version>${project.version}</version>
43+
</dependency>
44+
<!-- Utilities -->
45+
<dependency>
46+
<groupId>org.springframework.grpc</groupId>
47+
<artifactId>spring-grpc-test</artifactId>
4648
<version>${project.version}</version>
4749
</dependency>
48-
4950
</dependencies>
5051
</dependencyManagement>
5152

52-
</project>
53+
</project>

spring-grpc-docs/pom.xml

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

spring-grpc-spring-boot-autoconfigure/pom.xml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,33 @@
3939
<optional>true</optional>
4040
</dependency>
4141

42-
<!-- production dependencies -->
4342
<dependency>
4443
<groupId>org.springframework.grpc</groupId>
4544
<artifactId>spring-grpc-core</artifactId>
46-
<version>${project.parent.version}</version>
47-
</dependency>
48-
<dependency>
49-
<groupId>org.springframework.boot</groupId>
50-
<artifactId>spring-boot-starter</artifactId>
45+
<version>${project.version}</version>
46+
<optional>true</optional>
5147
</dependency>
5248
<dependency>
5349
<groupId>io.grpc</groupId>
5450
<artifactId>grpc-netty-shaded</artifactId>
5551
<optional>true</optional>
5652
</dependency>
53+
<dependency>
54+
<groupId>io.netty</groupId>
55+
<artifactId>netty-transport-native-epoll</artifactId>
56+
<optional>true</optional>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.springframework.boot</groupId>
60+
<artifactId>spring-boot-starter</artifactId>
61+
<scope>provided</scope>
62+
</dependency>
5763

5864
<!-- test dependencies -->
5965
<dependency>
6066
<groupId>org.springframework.grpc</groupId>
6167
<artifactId>spring-grpc-test</artifactId>
62-
<version>${project.parent.version}</version>
68+
<version>${project.version}</version>
6369
<scope>test</scope>
6470
</dependency>
6571
<dependency>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>org.springframework.grpc</groupId>
8+
<artifactId>spring-grpc</artifactId>
9+
<version>0.1.0-SNAPSHOT</version>
10+
</parent>
11+
<artifactId>spring-grpc-spring-boot-starter</artifactId>
12+
<packaging>jar</packaging>
13+
<name>Spring gRPC Spring Boot Starter</name>
14+
<description>Spring gRPC Spring Boot Starter</description>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>org.springframework.grpc</groupId>
19+
<artifactId>spring-grpc-core</artifactId>
20+
<version>${project.version}</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>org.springframework.grpc</groupId>
24+
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
25+
<version>${project.version}</version>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.springframework.boot</groupId>
29+
<artifactId>spring-boot-starter</artifactId>
30+
<version>${spring-boot.version}</version>
31+
</dependency>
32+
</dependencies>
33+
34+
</project>

0 commit comments

Comments
 (0)