Prakhar
Prakhar

Reputation: 71

Using Request Response Filter in a multi-module springboot application

I have created a multi-module application with 3 modules in it (one main and two other modules). I have created a custom request response filter in all the three modules with same name.

Now when I am triggering an endpoint present in one module, the request is getting filtered randomly through any of the three filters and hence getting unexpected response each time.

Can someone please help me with this if they have encountered this earlier as I am not getting slight clue why this is happening?

Also, if possible please share detailed explanation.

Upvotes: 0

Views: 323

Answers (1)

John Williams
John Williams

Reputation: 5440

Don't duplicate them.

Every implementation of javax.servlet.Filter annotated as a @Component will be created and added to the filter pipeline by Spring

Upvotes: 2

Related Questions