-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Labels
type: enhancementA general enhancementA general enhancement
Milestone
Description
I am trying to add my custom filter after Spring Security but I am unable to set order of filters. None of examples below work. My filter is alway added to the beginning of the chain.
@Bean
@Order(Ordered.LOWEST_PRECEDENCE)
public UserInsertingMdcFilter userInsertingMdcFilter() {
return new UserInsertingMdcFilter();
}
This didn't work too:
@Bean
public FilterRegistrationBean userInsertingMdcFilterRegistrationBean() {
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
UserInsertingMdcFilter userFilter = new UserInsertingMdcFilter();
registrationBean.setFilter(userFilter);
registrationBean.setOrder(Integer.MAX_VALUE);
return registrationBean;
}
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement