How do you implement gRPC clients in Spring Boot?
Build a gRPC client in Spring Boot with generated stubs, a shared ManagedChannel, deadlines, error handling and streaming, using the official grpc-java libraries.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Build a gRPC client in Spring Boot with generated stubs, a shared ManagedChannel, deadlines, error handling and streaming, using the official grpc-java libraries.
Use H2 as an in-memory database with Hibernate in Spring Boot for development and tests, including properties, jakarta entities and a repository test.
In Hibernate, @Entity is the standard Jakarta Persistence annotation that maps a class to a table and puts instances under Session management and dirty checking.
Set spring.jpa.hibernate.ddl-auto to let Hibernate create, update or validate tables from your entities, and learn why production needs migrations.
hibernate.hbm2ddl.auto lets Hibernate create, update or validate your schema at startup. See what each value does and what to use in production.
Which spring.jpa and spring.datasource properties to set for Hibernate in Spring Boot 3, from schema generation and SQL logging to pool tuning.
There is no @SqlFunction annotation in Hibernate. See the supported ways to add custom SQL functions to HQL: FunctionContributor, function() and @Formula.
Register custom SQL functions in Hibernate 6 using FunctionContributor, registerPattern and registerNamed, and call them from HQL, JPQL and Spring Data repositories.
@GrpcService registers a gRPC implementation with the embedded server. See a full example, its configuration and the official Spring gRPC alternative.
Define a proto contract, generate stubs, implement the service as a Spring bean and add the Spring gRPC starter. Covers ports, interceptors and testing.
There is no official spring-boot-starter-grpc. Learn what Spring gRPC and the community starter do and how to build a gRPC service with Spring Boot.
Learn gRPC with Spring Boot: proto definitions, stub generation, a server and client example, deadlines, error handling and when to prefer REST.
Spring Boot does not auto-configure WebSocketStompClient. See how to create it, test a STOMP endpoint with a real client and run it as a service-to-service client.
Build STOMP and raw WebSocket clients in Spring Boot with working code for connecting, subscribing, sending messages, authentication headers and reconnects.
Run Spring Boot on a random port and connect real WebSocket or STOMP clients, collecting messages in a BlockingQueue for reliable assertions.
Spring Boot has no @WebSocketTest annotation. Test WebSocket and STOMP endpoints with @SpringBootTest on a random port and a real client instead.
Save every WebSocket message to a database before broadcasting, then let reconnecting clients fetch what they missed through a history endpoint.
Start the real server on a random port, connect with a Spring WebSocket or STOMP client, and assert on queued messages with timeouts.
Add spring-boot-starter-websocket, register a STOMP endpoint and broker, handle messages with MessageMapping and connect with a stompjs client.
Build a real-time chat room with Spring Boot, STOMP and a JavaScript client, including join and leave notices, security and scaling advice.