Migrate to Spring gRPC 1.1 (Spring Boot 4.1)
ProprietaryMigrate applications from the standalone Spring gRPC project (org.springframework.grpc:*, Spring gRPC 1.0) to the version bundled with Spring Boot 4.1 (Spring gRPC 1.1). Spring gRPC graduated into Spring Boot in 4.1, so its starters, BOM, configuration properties, and test annotations move under org.springframework.boot.
Following the Spring gRPC 1.1 Migration Guide, this recipe swaps the org.springframework.grpc starters for the Spring Boot spring-boot-starter-grpc-* starters (splitting the combined runtime and test starters) and removes the standalone spring-grpc-dependencies BOM; renames the spring.grpc.server.* and per-channel spring.grpc.client.channels.<name>.* properties that changed in 1.1 and splits spring.grpc.server.address: host:port into separate address and port; renames the @AutoConfigureInProcessTransport and @LocalGrpcPort test annotations; and, because 1.1 no longer auto-scans generated proto stubs, flags classes that inject gRPC client stubs with a TODO so an explicit @ImportGrpcClients annotation can be added by hand.
Not automated: pinning the reactor-grpc-stub version. Spring gRPC 1.1 no longer manages it, so a version-less declaration must be given an explicit version once the standalone BOM is removed (Spring gRPC 1.0 managed 1.2.4).
io. moderne. java. spring. boot4. MigrateSpringGrpc_1_1mod run . --recipe= io. moderne. java. spring. boot4. MigrateSpringGrpc_1_1Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Change Gradle or Maven dependency
org.springframework.grpc:spring-grpc-server-spring-boot-starter - Change Gradle or Maven dependency
org.springframework.grpc:spring-grpc-client-spring-boot-starter - Change Gradle or Maven dependency
org.springframework.grpc:spring-grpc-server-web-spring-boot-starter - Split the combined Spring gRPC starter into server and client starters
- Split the Spring gRPC test starter into server-test and client-test starters
- Remove Maven managed dependency
org.springframework.grpc:spring-grpc-dependencies - Change the key of a Spring application property
- Change the key of a Spring application property
- Change property key
- Change property key
spring.grpc.server.keep-alive.timetospring.grpc.server.keepalive.time - Change property key
- Change property key
spring.grpc.server.keep-alive.timeouttospring.grpc.server.keepalive.timeout - Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Split
spring.grpc.server.addressintoaddressandport - Migrate Spring gRPC client channel properties to 1.1
- Change type
AutoConfigureInProcessTransporttoAutoConfigureTestGrpcTransport - Change type
LocalGrpcPorttoLocalGrpcServerPort - Flag gRPC client stub injections that need
@ImportGrpcClients