2

In our current version, we are able to load one filter from properties because it is creating a bean with the annotation @Bean, by creating a single FilterRegistrationBean.

My problem comes when I try to create multiple beans because there is not such annotation @Beans to add them all.

I've tried to add them to the ConfigurableApplicationContext but it creates the beans after spring boot adds the filters, so they are not been registered in the filters.

I've tried with the BeanFefinitionRegistryPostProcessor but it is not allowing the load of the properties automatically (By a class with the annotation @ConfigurationProperties) because it is executed before the properties are loaded, so I have to do it manually and this implies possible errors.

I've tried with FilterRegistrationBean and DelegatingProxyRegistrationBean but there is not a multiple definition of them.

Possible solution:

How to load multiple beans before/when the filters are added to spring-boot?

Thanks for your help

Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82
German20
  • 17
  • 3

0 Answers0