What is the significance of the @MessageMapping annotation?
@MessageMapping maps incoming STOMP messages to controller methods in Spring. See the WebSocket config, @SendTo broadcasting, method arguments and error handling.
2,882 posts about Java: questions with answers, tutorials and articles, newest first.
@MessageMapping maps incoming STOMP messages to controller methods in Spring. See the WebSocket config, @SendTo broadcasting, method arguments and error handling.
Learn to write a Spring WebSocket configuration class, from raw handlers with WebSocketConfigurer to STOMP brokers, with security tips.
@EnableWebSocket turns on Spring's low-level WebSocket support. It registers handlers from a WebSocketConfigurer; use STOMP with @EnableWebSocketMessageBroker for messaging.
Add the WebSocket starter, then use a raw handler or STOMP messaging. Includes working Spring Boot 3 code, a browser client, security and scaling advice.
Tune the auto-configured executor and scheduler with spring.task properties, add custom executors, and use virtual threads on Java 21 and newer.
Oracle triggers live in the database as PL/SQL. See how to create them, deploy them with migrations, and read their results from Spring Boot.
Use SimpleJdbcCall for most Oracle procedures, JdbcTemplate for custom output handling and JPA StoredProcedureQuery in Hibernate projects.
There is no OracleTemplate in Spring Boot. Use JdbcClient or JdbcTemplate with the Oracle driver for queries, PL/SQL calls and transactions.
Connect Spring Boot to Oracle Database with ojdbc11, a service-name JDBC URL, JPA and Hibernate 6 settings and a tuned HikariCP pool, without hand-written DataSource beans.
Spring builds on java.util.concurrent.Executor with TaskExecutor to run async work. Learn pool configuration, rejection policies and virtual threads.
Learn how Spring routes exceptions from @Async methods, when to use AsyncUncaughtExceptionHandler, and how to handle failures with CompletableFuture.
Add Flyway to Spring Boot, write versioned and repeatable migration scripts, configure baselines, and verify applied changes in flyway_schema_history.
CompletableFuture is how Spring returns and composes asynchronous results from @Async methods and controllers. See executors, chaining and error handling.
Use @Transactional with PostgreSQL in Spring Boot: configuration, rollback rules, propagation, isolation levels and why transactions sometimes do nothing.
Set up a bounded ThreadPoolTaskExecutor for @Async in Spring and Spring Boot, with sizing advice, exception handling and virtual threads.
The DataSource gives Spring Boot its pooled PostgreSQL connections. Learn the properties, HikariCP tuning and when to define your own bean.
@Scheduled registers a method with Spring's TaskScheduler. See how each attribute works, how tasks are executed and how to configure the thread pool.
Add the PostgreSQL driver and datasource properties, let Spring Boot configure HikariCP and Hibernate, and manage the schema with Flyway migrations.
Share rate limits across Spring Boot instances with Redis: an atomic Lua counter, an interceptor and a 429 response with Retry-After.
Spring Boot has no built-in sharding, but a routing DataSource and a good shard key let you split MySQL data across servers. Learn the strategy and pitfalls.