MarcGiffing / wicket-spring-boot

Spring Boot starter for Apache Wicket
152 stars 62 forks source link

How do I add additional, custom filters? #177

Closed jhamsle closed 3 years ago

jhamsle commented 3 years ago

I'd like to add an additional filter to better integrate with Elastic using this as a model. Normally I would have modified the web.xml file, but since these things are now auto-configured I'm not sure how I go about registering a new listener. Wicket itself doesn't seem to allow it via code; do I need to create a custom config initializer?

jhamsle commented 3 years ago

I'm open to alternatives, but I was able to achieve this by registering a FilterRegistrationBean that creates my new filter. If I get no suggestions by the end of the week I'll close this issue.

martin-g commented 3 years ago

Actually, this is the correct way for a Spring Boot application.

jhamsle commented 3 years ago

Good deal then. Thanks for letting me know.