natanc
natanc

Reputation: 41

Spring Boot - Multiple filter chains from dependencies

I'm having a following scenario with Spring modules A and B:

When I launch B, I get 2 Filter chains , first comes from module A and it's used for SSO, second comes from module B and is redundant:

Problems:

Upvotes: 3

Views: 1060

Answers (1)

nalas
nalas

Reputation: 85

This is old but I had the same issue and solved it by adding the @EnableWebSecurity annotation to module A and this to the module B:s @SpringBootApplication:

@SpringBootApplication(exclude = { SecurityAutoConfiguration.class })

If you want to know why then google "SecurityAutoConfiguration" for more information about Springs security default behaviour.

Upvotes: 0

Related Questions