How do you configure MySQL connection pooling in Spring Boot?
Spring Boot uses HikariCP by default. Set the MySQL URL, tune maximum-pool-size and max-lifetime, and watch the pool with Actuator metrics.
2,882 posts about Java: questions with answers, tutorials and articles, newest first.
Spring Boot uses HikariCP by default. Set the MySQL URL, tune maximum-pool-size and max-lifetime, and watch the pool with Actuator metrics.
Cache-Control decides how browsers and CDNs store and reuse responses. See how caches use it, which directives to pick and how to debug caching problems.
A practical order of work for faster MySQL queries in Spring Boot 3: measure, index, remove N+1, project, paginate, batch and cache.
Use Spring's cache abstraction on the service layer with Caffeine or Redis, set a TTL, and add HTTP cache headers for browsers and CDNs.
Set up Spring Boot 3 with MySQL using the current driver, datasource properties, Spring Data JPA, Flyway and HikariCP, avoiding removed dialect settings.
Build request-reply messaging with RabbitMQ RPC in Spring Boot using convertSendAndReceive, a listener that returns the reply, and a reply timeout.
@RequestMapping(value = /v1) adds a /v1 URL prefix to a Spring controller, the basic form of URI API versioning. Learn how to run v1 and v2 side by side.
A practical guide to REST API versioning in Spring MVC, with code for path, query, header and media type versioning and Spring Framework 7 built-in support.
Declare a priority queue with x-max-priority, set a priority on each message, and lower prefetch so RabbitMQ can deliver urgent messages first in Spring Boot.
The Spring HATEOAS Link class holds a URI and a relation type. See how to create links, attach them to EntityModel and render HAL responses.
RabbitMQ routing in Spring Boot works through exchanges, bindings and queues. See direct, topic, fanout and headers exchanges with working code.
EntityModel wraps a resource with hypermedia links so clients can navigate your REST API. See linkTo, methodOn, assemblers and conditional links in Spring Boot 3.
RepresentationModel is the Spring HATEOAS base class that holds hypermedia links. See how to extend it, wrap data with EntityModel and build links.
RabbitMQ filters by routing messages to queues. Learn direct, topic and headers bindings in Spring Boot and when to filter in the consumer instead.
Declare a dead-letter exchange and queue, retry failed messages, then dead-letter them and replay safely with Spring AMQP.
Add hypermedia links to a Spring REST API with EntityModel, CollectionModel and link builders, and keep controllers clean with a model assembler.
Use Spring AMQP acknowledge modes in Spring Boot: automatic and manual acks, retry, dead letter queues and publisher confirms with examples.
@CrossOrigin lets browsers call your Spring API from another origin. See its attributes, credential rules, global CORS config and Spring Security setup.
Publish messages from Spring Boot 3 with RabbitTemplate, declare exchanges and bindings, and add publisher confirms and returns for reliable delivery.
Choose between global CORS mappings and @CrossOrigin in Spring Boot, learn how they merge, and test preflight behaviour with MockMvc.