Skip to content

@AutoConfigureMockMvc imports auto-configurations manually #13822

@snicoll

Description

@snicoll

@AutoConfigureMockMvc has a secure attribute that's true by default. It is possible for the user to set that to false in which case security should not apply.

It is currently implemented using an @Import that is conditional on the property. This makes that a very unusual construct for importing auto-configurations. The side effect is that if you exclude the security auto-configuration in your app (via exclude on @SpringBootApplication) that exclude is ignored, even if #12586 is implemented.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions