Migrate to Spring gRPC 1.1 (Spring Boot 4.1)

Proprietary

Migrate 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_1
mod run . --recipe=io.moderne.java.spring.boot4.MigrateSpringGrpc_1_1

Install 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.

  1. Change Gradle or Maven dependency org.springframework.grpc:spring-grpc-server-spring-boot-starter
  2. Change Gradle or Maven dependency org.springframework.grpc:spring-grpc-client-spring-boot-starter
  3. Change Gradle or Maven dependency org.springframework.grpc:spring-grpc-server-web-spring-boot-starter
  4. Split the combined Spring gRPC starter into server and client starters
  5. Split the Spring gRPC test starter into server-test and client-test starters
  6. Remove Maven managed dependency org.springframework.grpc:spring-grpc-dependencies
  7. Change the key of a Spring application property
  8. Change the key of a Spring application property
  9. Change property key
  10. Change property key spring.grpc.server.keep-alive.time to spring.grpc.server.keepalive.time
  11. Change property key
  12. Change property key spring.grpc.server.keep-alive.timeout to spring.grpc.server.keepalive.timeout
  13. Change the key of a Spring application property
  14. Change the key of a Spring application property
  15. Change the key of a Spring application property
  16. Change the key of a Spring application property
  17. Change the key of a Spring application property
  18. Change the key of a Spring application property
  19. Split spring.grpc.server.address into address and port
  20. Migrate Spring gRPC client channel properties to 1.1
  21. Change type AutoConfigureInProcessTransport to AutoConfigureTestGrpcTransport
  22. Change type LocalGrpcPort to LocalGrpcServerPort
  23. Flag gRPC client stub injections that need @ImportGrpcClients