|
20 | 20 |
|
21 | 21 | import org.apache.commons.logging.Log;
|
22 | 22 | import org.apache.commons.logging.LogFactory;
|
| 23 | +import org.w3c.dom.Element; |
| 24 | +import org.w3c.dom.Node; |
| 25 | + |
23 | 26 | import org.springframework.beans.factory.config.BeanDefinition;
|
24 | 27 | import org.springframework.beans.factory.config.BeanDefinitionHolder;
|
25 | 28 | import org.springframework.beans.factory.xml.BeanDefinitionDecorator;
|
|
45 | 48 | import org.springframework.security.config.websocket.WebSocketMessageBrokerSecurityBeanDefinitionParser;
|
46 | 49 | import org.springframework.security.core.SpringSecurityCoreVersion;
|
47 | 50 | import org.springframework.util.ClassUtils;
|
48 |
| -import org.w3c.dom.Element; |
49 |
| -import org.w3c.dom.Node; |
50 | 51 |
|
51 | 52 | /**
|
52 | 53 | * Parses elements from the "security" namespace
|
@@ -87,7 +88,7 @@ public BeanDefinition parse(Element element, ParserContext pc) {
|
87 | 88 | if (!namespaceMatchesVersion(element)) {
|
88 | 89 | pc.getReaderContext()
|
89 | 90 | .fatal("You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd or spring-security-3.1.xsd schema or spring-security-3.2.xsd schema or spring-security-4.0.xsd schema "
|
90 |
| - + "with Spring Security 5.3. Please update your schema declarations to the 5.3 schema.", |
| 91 | + + "with Spring Security 5.4. Please update your schema declarations to the 5.4 schema.", |
91 | 92 | element);
|
92 | 93 | }
|
93 | 94 | String name = pc.getDelegate().getLocalName(element);
|
@@ -223,7 +224,7 @@ private boolean namespaceMatchesVersion(Element element) {
|
223 | 224 | private boolean matchesVersionInternal(Element element) {
|
224 | 225 | String schemaLocation = element.getAttributeNS(
|
225 | 226 | "http://www.w3.org/2001/XMLSchema-instance", "schemaLocation");
|
226 |
| - return schemaLocation.matches("(?m).*spring-security-5\\.3.*.xsd.*") |
| 227 | + return schemaLocation.matches("(?m).*spring-security-5\\.4.*.xsd.*") |
227 | 228 | || schemaLocation.matches("(?m).*spring-security.xsd.*")
|
228 | 229 | || !schemaLocation.matches("(?m).*spring-security.*");
|
229 | 230 | }
|
|
0 commit comments