13 lines
519 B
Plaintext
13 lines
519 B
Plaintext
# CommandLineRunner and ApplicationRunner beans sorted together by @Order / Ordered
|
|
|
|
(declaration order in OrderingApp.java is NOT the order below)
|
|
|
|
CommandLineRunner @Order(HIGHEST_PRECEDENCE)
|
|
ApplicationRunner @Order(1) on the class
|
|
CommandLineRunner @Order(2) on the class
|
|
ApplicationRunner implements Ordered, getOrder() = 3
|
|
Both @Order(4) -> ApplicationRunner.run
|
|
Both @Order(4) -> CommandLineRunner.run
|
|
CommandLineRunner @Order(5) on a @Bean method
|
|
ApplicationRunner no order at all (lowest precedence)
|