Remove Configuration meta-annotation from Enable* annotations

Before, Spring Security's @Enable* annotations were meta-annotated with @Configuration.
While convenient, this is not consistent with the rest of the Spring projects and most notably
Spring Framework's @Enable annotations. Additionally, the introduction of support for
@Configuration(proxyBeanMethods=false) in Spring Framework provides a compelling reason to
remove @Configuration meta-annotation from Spring Security's @Enable annotations and allow
users to opt into their preferred configuration mode.

Closes gh-6613

Signed-off-by: Joshua Sattler <joshua.sattler@mailbox.org>
This commit is contained in:
Joshua Sattler
2022-07-30 03:47:02 +02:00
parent 15f525c614
commit 040111ae9e
237 changed files with 1324 additions and 14 deletions

View File

@@ -28,6 +28,7 @@ import org.springframework.context.annotation.*;
import org.springframework.security.config.annotation.authentication.builders.*;
import org.springframework.security.config.annotation.web.configuration.*;
@Configuration
@EnableWebSecurity
public class WebSecurityConfig {
@@ -191,6 +192,7 @@ The following example has a different configuration for URL's that start with `/
====
[source,java]
----
@Configuration
@EnableWebSecurity
public class MultiHttpSecurityConfig {
@Bean <1>
@@ -284,6 +286,7 @@ You can then use the custom DSL:
====
[source,java]
----
@Configuration
@EnableWebSecurity
public class Config {
@Bean