What is the significance of dependencyManagement in Maven?
dependencyManagement in Maven centralises dependency versions across modules. Learn parent POM usage, BOM imports, overrides and how to check resolved versions.
2,887 posts about Java: questions with answers, tutorials and articles, newest first.
dependencyManagement in Maven centralises dependency versions across modules. Learn parent POM usage, BOM imports, overrides and how to check resolved versions.
Declare a dependency in pom.xml, choose the right scope, manage versions with a BOM, exclude transitive jars, and debug conflicts with the tree.
Learn what the Maven pom.xml file does: project coordinates, dependencies, plugins, profiles and the effective POM, with examples for Java 21.
Install Maven, generate a quickstart project or write the pom.xml yourself, set the Java release and add JUnit 5. Build with mvn clean package.
Understand how Maven declares, resolves and versions dependencies, from scopes and transitive libraries to dependencyManagement and BOM imports.
Define a ThreadPoolTaskExecutor bean, tune its pool and queue, use it with @Async, and switch to virtual threads on Java 21 and later.
@Scheduled(fixedRate) starts a Spring task at a steady interval measured between run starts. See setup, units, fixedDelay differences and overlap handling.
Schedule a cron job in Spring or Spring Boot with @Scheduled, understand the six-field expression, set the time zone and avoid duplicate runs on several instances.
@EnableScheduling registers the post-processor that runs @Scheduled methods. See trigger types, thread pool sizing and common production pitfalls.
Schedule jobs in Spring with @Scheduled, cron and TaskScheduler, size the scheduler pool, schedule dynamically and avoid duplicate runs across instances.
Runnable returns nothing, Callable returns a result and can throw checked exceptions. See both with ExecutorService, Future and exception handling.
Exceptions in @Async methods do not reach the caller. Learn AsyncUncaughtExceptionHandler, CompletableFuture error handling and common pitfalls.
CompletableFuture lets you run tasks asynchronously and chain, combine and recover from errors without blocking. It extends Future with a non-blocking pipeline API.
Define a ThreadPoolTaskExecutor bean with bounded queue and rejection policy, use it with @Async, or tune Boot properties and virtual threads.
Spring builds on the JDK Executor with TaskExecutor and ThreadPoolTaskExecutor to run async, scheduled and background work in managed thread pools.
Add @EnableAsync and annotate public methods with @Async to run them on a task executor, with a custom pool, error handling and virtual threads.
@Async runs a Spring bean method on a separate executor thread through a proxy. Learn how to enable it, pick an executor, handle errors and avoid common traps.
Use fixedRate for a steady start-to-start cadence and fixedDelay for a gap after each run finishes. Includes externalised intervals, thread pools and multi-instance caveats.
@EnableScheduling lets Spring run @Scheduled methods. See fixedRate, fixedDelay, cron, the single-thread default and multi-instance pitfalls.
Use @Scheduled in Spring Boot with fixedRate, fixedDelay and cron, configure the scheduler pool, and avoid duplicate runs across instances.