diff --git a/pom.xml b/pom.xml index ca3567c..4a2a17b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ spring-grpc-spring-boot-autoconfigure spring-grpc-spring-boot-starter spring-grpc-client-spring-boot-starter + spring-grpc-server-web-spring-boot-starter samples diff --git a/spring-grpc-dependencies/pom.xml b/spring-grpc-dependencies/pom.xml index 174d262..1fa606b 100644 --- a/spring-grpc-dependencies/pom.xml +++ b/spring-grpc-dependencies/pom.xml @@ -75,6 +75,16 @@ spring-grpc-spring-boot-starter ${project.version} + + org.springframework.grpc + spring-grpc-client-spring-boot-starter + ${project.version} + + + org.springframework.grpc + spring-grpc-server-web-spring-boot-starter + ${project.version} + org.springframework.grpc diff --git a/spring-grpc-docs/src/main/antora/modules/ROOT/pages/server.adoc b/spring-grpc-docs/src/main/antora/modules/ROOT/pages/server.adoc index 7e0cc3f..231b4b0 100644 --- a/spring-grpc-docs/src/main/antora/modules/ROOT/pages/server.adoc +++ b/spring-grpc-docs/src/main/antora/modules/ROOT/pages/server.adoc @@ -59,21 +59,15 @@ dependencies { == Servlet Server Any servlet container can be used to run a gRPC server. -Spring gRPC includes autoconfiguration that configures the server to use the servlet container if it detects that it is in a web application, so all you have to do is include `spring-boot-starter-web` and the `grpc-servlet` dependnecy in your application. +Spring gRPC includes autoconfiguration that configures the server to use the servlet container if it detects that it is in a web application. +Spring gRPC also provides a convenience starter that includes the required dependencies (`spring-boot-starter-web` and the `grpc-servlet-jakarta`) for this scenario. +So all you have to do is include the `spring-boot-starter-web` dependency as follows: [source,xml] ---- - - org.springframework.boot - spring-boot-starter-web - org.springframework.grpc - spring-grpc-spring-boot-starter - - - io.grpc - grpc-servlet-jakarta + spring-grpc-server-web-spring-boot-starter ---- @@ -82,9 +76,7 @@ For Gradle users [source,gradle] ---- dependencies { - implementation "org.springframework.boot:spring-boot-starter-web" - implementation "org.springframework.grpc:spring-grpc-spring-boot-starter" - implementation "io.grpc:grpc-servlet-jakarta" + implementation "org.springframework.grpc:spring-grpc-server-web-spring-boot-starter" } ---- diff --git a/spring-grpc-server-web-spring-boot-starter/pom.xml b/spring-grpc-server-web-spring-boot-starter/pom.xml new file mode 100644 index 0000000..53e65b2 --- /dev/null +++ b/spring-grpc-server-web-spring-boot-starter/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + org.springframework.grpc + spring-grpc + 0.4.0-SNAPSHOT + + spring-grpc-server-web-spring-boot-starter + jar + Spring gRPC Servlet Server Spring Boot Starter + Spring gRPC Servlet Server Spring Boot Starter + + + + org.springframework.grpc + spring-grpc-spring-boot-starter + + + io.grpc + grpc-servlet-jakarta + + + org.springframework.boot + spring-boot-starter-web + ${spring-boot.version} + + + +