Annotation Type Order
Where a bean stands among the beans of its type: the lower the value, the
earlier it comes in a List an injection point receives, and the earlier a
SecurityFilterChain is asked whether a request is its own.
@Bean
@Order(1)
SecurityFilterChain api(HttpSecurity http) { ... }
@Bean
@Order(2)
SecurityFilterChain pages(HttpSecurity http) { ... }
A bean without one comes last, in the order the build found it. Beans with
the same value keep that order among themselves. The order says nothing about
which bean a single injection point receives -- that is @Primary and
@Qualifier -- or about the order beans are constructed in.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe value that comes before every other.static final intThe value of a bean that carries no@Order. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintThe position:HIGHEST_PRECEDENCEcomes first,LOWEST_PRECEDENCElast.
-
Field Details
-
HIGHEST_PRECEDENCE
static final int HIGHEST_PRECEDENCEThe value that comes before every other.- See Also:
-
LOWEST_PRECEDENCE
static final int LOWEST_PRECEDENCEThe value of a bean that carries no@Order.- See Also:
-
-
Element Details
-
value
-