1

spring boot annotation @order

The lower the number, the higher the precedence

If I use @Order(-1000), what's that means? extremely high ?

Shahid Ghafoor
  • 2,991
  • 17
  • 68
  • 123

1 Answers1

4

Yes, @Order(-1000) will give you a higher precedence than say @Order(-1) or @Order(1000).

@Order(-2147483648) has the highest precedence.

See more here https://docs.spring.io/spring/docs/current/javadoc-api/constant-values.html#org.springframework.core.Ordered.HIGHEST_PRECEDENCE

Yuvraj Jaiswal
  • 1,605
  • 13
  • 20