0

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
krishnakumarp
  • 8,967
  • 3
  • 49
  • 55

1 Answers1

1

Yes you can: org.springframework.core.annotation.Order

Here is an example

Tom Van Rossom
  • 1,440
  • 10
  • 18