Since @EnableMethodSecurity defines multiple method interceptors, an order attribute may be misleading. That said, it would be nice to be able to change the default position its method interceptors have in the Spring AOP advisor chain.

This is already possible by re-declaring each method interceptor as a bean and setting their individual order values one-by-one.

Instead, an attribute would make this easier. Something like:

@EnableMethodSecurity(offset = 1000)

would mean that the method interceptors should be given values increasing from 1000, allowing applications to select where the interceptors should be placed.

Comment From: Kiriakos1998

Hello @jzheaux , I would like to work on this. However it's not clear to me how the ordering will take place according to the offset. Are the interceptors expected to have for example an order value like 1005, 1007 if the offset is set to be 1000?

Comment From: ykardziyaka

Hi @Kiriakos1998. Are you still working/planing to work on the issue? I would like to give it a try, if you're not.