My Spring Boot Rest Application uses a library that unfortunately provides a Controller Advice that is set with @Order(Ordered.HIGHEST_PRECEDENCE)
.
I noticed that I can extend this class and likewise set it locally to @Order(Ordered.HIGHEST_PRECEDENCE)
and my class apparently takes precedence as observed from testing. My question is whether this order is guaranteed, i.e. will Spring set locally defined ordered classes at higher precedence than those in imported libraries even though they are defined to have the same order?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…