Reputation: 9295
I have a filter (CorsFilter) that is configured using @Bean. This filter should run before LogoutFilter. I can do this by calling HttpSecurity.addFilterBefore(corsFilter, LogoutFilter.class)
method in my implementation of ResourceServerConfigurerAdapter.configure(HttpSecurity http)
Can I achieve the effect of addFilterBefore just using annotation. Is there an @Before or something like that?
Spring Core 4.2.4
Spring Boot 1.3.1
Spring Security 4.0.2
Upvotes: 0
Views: 641
Reputation: 1470
Yes you can: org.springframework.core.annotation.Order
Here is an example
Upvotes: 1