Spring: @Order does not control bean creation order

@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.

Full code & output

This topic is available to PRO members.

Sign in Create a free account

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