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
This commit is contained in:
@@ -15,7 +15,7 @@ To create a simple gRPC server, you can use the Spring Boot starter. For Maven:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||
<artifactId>spring-grpc-spring-boot-starter</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
@@ -23,7 +23,7 @@ To create a simple gRPC server, you can use the Spring Boot starter. For Maven:
|
||||
or for Gradle:
|
||||
|
||||
```groovy
|
||||
implementation 'org.springframework.grpc:spring-grpc-spring-boot-autoconfigure:0.1.0-SNAPSHOT'
|
||||
implementation 'org.springframework.grpc:spring-grpc-spring-boot-starter:0.1.0-SNAPSHOT'
|
||||
```
|
||||
|
||||
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
|
||||
To reformat using the [java-format plugin](https://github.com/spring-io/spring-javaformat)
|
||||
```shell
|
||||
./mvnw spring-javaformat:apply
|
||||
```
|
||||
```
|
||||
|
||||
1
pom.xml
1
pom.xml
@@ -19,6 +19,7 @@
|
||||
<module>spring-grpc-core</module>
|
||||
<module>spring-grpc-test</module>
|
||||
<module>spring-grpc-spring-boot-autoconfigure</module>
|
||||
<module>spring-grpc-spring-boot-starter</module>
|
||||
<module>samples</module>
|
||||
</modules>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ dependencyManagement {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.grpc:spring-grpc-spring-boot-autoconfigure'
|
||||
implementation 'org.springframework.grpc:spring-grpc-spring-boot-starter'
|
||||
implementation 'io.grpc:grpc-services'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
testImplementation 'org.springframework.grpc:spring-grpc-test'
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||
<artifactId>spring-grpc-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
|
||||
@@ -26,27 +26,28 @@
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-spring-boot-starter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<!-- Utilities -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||
<artifactId>spring-grpc-spring-boot-starter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -39,27 +39,33 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- production dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-core</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-netty-shaded</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-test</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
34
spring-grpc-spring-boot-starter/pom.xml
Normal file
34
spring-grpc-spring-boot-starter/pom.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>spring-grpc-spring-boot-starter</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Spring gRPC Spring Boot Starter</name>
|
||||
<description>Spring gRPC Spring Boot Starter</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.grpc</groupId>
|
||||
<artifactId>spring-grpc-spring-boot-autoconfigure</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
Reference in New Issue
Block a user