@Order sorts beans when they are injected as a List or applied as a chain. It has no effect on which bean is constructed first. Code that relies on it for initialisation sequencing works by accident until a classpath change reshuffles it.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25