Skip to content

Commit 12f3e90

Browse files
Update to Spring Security 6.0
1 parent 11aa02c commit 12f3e90

File tree

8 files changed

+4427
-11
lines changed

8 files changed

+4427
-11
lines changed

config/src/main/java/org/springframework/security/config/SecurityNamespaceHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public BeanDefinition parse(Element element, ParserContext pc) {
9494
if (!namespaceMatchesVersion(element)) {
9595
pc.getReaderContext().fatal("You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd or "
9696
+ "spring-security-3.1.xsd schema or spring-security-3.2.xsd schema or spring-security-4.0.xsd schema "
97-
+ "with Spring Security 5.6. Please update your schema declarations to the 5.6 schema.", element);
97+
+ "with Spring Security 6.0. Please update your schema declarations to the 6.0 schema.", element);
9898
}
9999
String name = pc.getDelegate().getLocalName(element);
100100
BeanDefinitionParser parser = this.parsers.get(name);
@@ -215,7 +215,7 @@ private boolean namespaceMatchesVersion(Element element) {
215215

216216
private boolean matchesVersionInternal(Element element) {
217217
String schemaLocation = element.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation");
218-
return schemaLocation.matches("(?m).*spring-security-5\\.6.*.xsd.*")
218+
return schemaLocation.matches("(?m).*spring-security-6\\.0.*.xsd.*")
219219
|| schemaLocation.matches("(?m).*spring-security.xsd.*")
220220
|| !schemaLocation.matches("(?m).*spring-security.*");
221221
}

config/src/main/resources/META-INF/spring.schemas

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-5.6.xsd
1+
http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.0.xsd
2+
http\://www.springframework.org/schema/security/spring-security-6.0.xsd=org/springframework/security/config/spring-security-6.0.xsd
23
http\://www.springframework.org/schema/security/spring-security-5.6.xsd=org/springframework/security/config/spring-security-5.6.xsd
34
http\://www.springframework.org/schema/security/spring-security-5.5.xsd=org/springframework/security/config/spring-security-5.5.xsd
45
http\://www.springframework.org/schema/security/spring-security-5.4.xsd=org/springframework/security/config/spring-security-5.4.xsd
@@ -17,7 +18,8 @@ http\://www.springframework.org/schema/security/spring-security-2.0.xsd=org/spri
1718
http\://www.springframework.org/schema/security/spring-security-2.0.1.xsd=org/springframework/security/config/spring-security-2.0.1.xsd
1819
http\://www.springframework.org/schema/security/spring-security-2.0.2.xsd=org/springframework/security/config/spring-security-2.0.2.xsd
1920
http\://www.springframework.org/schema/security/spring-security-2.0.4.xsd=org/springframework/security/config/spring-security-2.0.4.xsd
20-
https\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-5.6.xsd
21+
https\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.0.xsd
22+
https\://www.springframework.org/schema/security/spring-security-6.0.xsd=org/springframework/security/config/spring-security-6.0.xsd
2123
https\://www.springframework.org/schema/security/spring-security-5.6.xsd=org/springframework/security/config/spring-security-5.6.xsd
2224
https\://www.springframework.org/schema/security/spring-security-5.5.xsd=org/springframework/security/config/spring-security-5.5.xsd
2325
https\://www.springframework.org/schema/security/spring-security-5.4.xsd=org/springframework/security/config/spring-security-5.4.xsd

config/src/main/resources/org/springframework/security/config/spring-security-6.0.rnc

Lines changed: 1130 additions & 0 deletions
Large diffs are not rendered by default.

config/src/main/resources/org/springframework/security/config/spring-security-6.0.xsd

Lines changed: 3284 additions & 0 deletions
Large diffs are not rendered by default.

config/src/test/java/org/springframework/security/config/doc/XsdDocumentedTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,7 +64,7 @@ public class XsdDocumentedTests {
6464

6565
String schema31xDocumentLocation = "org/springframework/security/config/spring-security-3.1.xsd";
6666

67-
String schemaDocumentLocation = "org/springframework/security/config/spring-security-5.6.xsd";
67+
String schemaDocumentLocation = "org/springframework/security/config/spring-security-6.0.xsd";
6868

6969
XmlSupport xml = new XmlSupport();
7070

@@ -149,8 +149,8 @@ public void sizeWhenReadingFilesystemThenIsCorrectNumberOfSchemaFiles() throws I
149149
.getParentFile()
150150
.list((dir, name) -> name.endsWith(".xsd"));
151151
// @formatter:on
152-
assertThat(schemas.length).isEqualTo(18)
153-
.withFailMessage("the count is equal to 18, if not then schemaDocument needs updating");
152+
assertThat(schemas.length).isEqualTo(19)
153+
.withFailMessage("the count is equal to 19, if not then schemaDocument needs updating");
154154
}
155155

156156
/**

core/src/main/java/org/springframework/security/core/SpringSecurityCoreVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public final class SpringSecurityCoreVersion {
4343
* N.B. Classes are not intended to be serializable between different versions. See
4444
* SEC-1709 for why we still need a serial version.
4545
*/
46-
public static final long SERIAL_VERSION_UID = 560L;
46+
public static final long SERIAL_VERSION_UID = 600L;
4747

4848
static final String MIN_SPRING_VERSION = getSpringVersion();
4949

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ springJavaformatVersion=0.0.29
33
springBootVersion=2.4.2
44
springFrameworkVersion=5.3.11
55
openSamlVersion=3.4.6
6-
version=5.6.0-SNAPSHOT
6+
version=6.0.0-SNAPSHOT
77
kotlinVersion=1.5.31
88
samplesBranch=main
99
org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError

taglibs/src/main/resources/META-INF/security.tld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
version="2.0">
2121
<description>Spring Security Authorization Tag Library</description>
2222

23-
<tlib-version>5.6</tlib-version>
23+
<tlib-version>6.0</tlib-version>
2424
<short-name>security</short-name>
2525
<uri>http://www.springframework.org/security/tags</uri>
2626

0 commit comments

Comments
 (0)