What is the role of SonarQube in code quality analysis?
SonarQube scans code for bugs, vulnerabilities, smells and coverage gaps, then fails the pipeline when a quality gate is not met. Includes a Maven CI setup.
2,881 posts about Java: questions with answers, tutorials and articles, newest first.
SonarQube scans code for bugs, vulnerabilities, smells and coverage gaps, then fails the pipeline when a quality gate is not met. Includes a Maven CI setup.
Organise tests as fail-fast pipeline stages, from unit tests and static checks to Testcontainers integration tests, end-to-end checks and smoke tests.
A Jenkinsfile stores your Jenkins pipeline in source control so builds are versioned, reviewable and reproducible. This guide shows a complete declarative example.
Build, test, containerise and deploy a Spring Boot app automatically using GitHub Actions or Jenkins, with a Java 21 Dockerfile and a rollback-friendly image tagging scheme.
The Compose file defines services, networks, volumes and secrets for a multi-container app. Learn its structure with a full example.
Keep one image for every environment and inject settings at run time with environment variables, read-only config files and secrets, shown with a Spring Boot example.
A Dockerfile builds a reproducible container image for a Spring Boot app. See a multi-stage, layered, non-root example and when to use buildpacks.
Containerise a Spring Boot app with a Dockerfile, a multi-stage layered build or buildpacks, then run it with Docker Compose and a database.
@HystrixCommand wrapped a method with a circuit breaker, timeout and fallback. Hystrix is retired, so Resilience4j is now the standard choice.
Add a Resilience4j circuit breaker to a Spring Boot 3 app with annotations, tuned thresholds, fallback methods and Actuator monitoring.
@FeignClient turns a Java interface into an HTTP client with load balancing, timeouts and fallbacks. See how to set it up, configure it and handle errors in Spring Cloud.
Compare synchronous and asynchronous communication between microservices and implement both in Spring Boot with RestClient and Spring Cloud Stream.
The @LoadBalanced annotation lets a Spring HTTP client call services by name and spread requests across instances. See setup, examples and the Ribbon replacement.
Balance calls across service instances in Spring Boot with Spring Cloud LoadBalancer and a @LoadBalanced client, and learn why Ribbon was removed.
It turns a Spring Boot application into a Eureka service registry where microservices register and discover each other by name instead of fixed URLs.
Build a Eureka server and client in Spring Boot, understand the heartbeat lifecycle and discover services with DiscoveryClient or a load-balanced client.
@EnableDiscoveryClient activates Spring Cloud service discovery and registration with any registry. It is now optional, since a starter on the classpath is enough.
A practical guide to Spring Boot microservices covering service boundaries, Eureka discovery, Spring Cloud Gateway, RestClient calls and Resilience4j.
Add per-client rate limiting to Spring Boot with a Bucket4j filter that returns 429 and Retry-After, and learn when to go distributed.
ETag identifies a version of a resource, enabling 304 Not Modified caching and safe updates with If-Match. Includes strong vs weak ETags and Spring Boot code.