Skip to content

Commit 89bd670

Browse files
committed
Deprecate SecurityConfig
Closes gh-16773
1 parent a884c3c commit 89bd670

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

config/src/main/java/org/springframework/security/config/http/ChannelAttributeFactory.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import org.springframework.beans.factory.BeanCreationException;
2222
import org.springframework.security.access.ConfigAttribute;
2323
import org.springframework.security.access.SecurityConfig;
24+
import org.springframework.security.authorization.AuthorizationManager;
25+
import org.springframework.security.core.annotation.SecurityAnnotationScanner;
2426
import org.springframework.security.web.access.channel.ChannelDecisionManagerImpl;
2527

2628
/**
@@ -29,7 +31,14 @@
2931
*
3032
* @author Luke Taylor
3133
* @since 3.0
34+
* @deprecated In modern Spring Security APIs, each API manages its own configuration
35+
* context. As such there is no direct replacement for this interface. In the case of
36+
* method security, please see {@link SecurityAnnotationScanner} and
37+
* {@link AuthorizationManager}. In the case of channel security, please see
38+
* {@code HttpsRedirectFilter}. In the case of web security, please see
39+
* {@link AuthorizationManager}.
3240
*/
41+
@Deprecated
3342
public final class ChannelAttributeFactory {
3443

3544
private static final String OPT_REQUIRES_HTTP = "http";

core/src/main/java/org/springframework/security/access/SecurityConfig.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,23 @@
2020
import java.util.ArrayList;
2121
import java.util.List;
2222

23+
import org.springframework.security.authorization.AuthorizationManager;
24+
import org.springframework.security.core.annotation.SecurityAnnotationScanner;
2325
import org.springframework.util.Assert;
2426
import org.springframework.util.StringUtils;
2527

2628
/**
2729
* Stores a {@link ConfigAttribute} as a <code>String</code>.
2830
*
2931
* @author Ben Alex
32+
* @deprecated In modern Spring Security APIs, each API manages its own configuration
33+
* context. As such there is no direct replacement for this interface. In the case of
34+
* method security, please see {@link SecurityAnnotationScanner} and
35+
* {@link AuthorizationManager}. In the case of channel security, please see
36+
* {@code HttpsRedirectFilter}. In the case of web security, please see
37+
* {@link AuthorizationManager}.
3038
*/
39+
@Deprecated
3140
public class SecurityConfig implements ConfigAttribute {
3241

3342
@Serial

0 commit comments

Comments
 (0)