You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring是否移除了无版本号的spring-security.xsd?技术咨询

Spring Security无版本号XSD访问失败问题

现象与修复经过

  • 应用突发启动故障,抛出错误栈:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/security/spring-security.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.
  • 根因异常:
Caused by: java.io.FileNotFoundException: http://www.springframework.org/schema/security/spring-security.xsd
  • 未对应用配置、代码或基础设施做任何部署变更,XML配置中多年来一直使用如下声明:
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
  • 排查发现无版本号的spring-security.xsd已不存在,将URL修改为带版本号的形式后,应用恢复正常启动。

待解疑问

  • Spring官方是否移除了无版本号的spring-security.xsd文件?
  • 是否存在其他可能触发该问题的场景?
  • 若确为官方移除操作,这将影响所有通过URL直接访问无版本号Security XSD的应用。

补充细节

  • 检查Spring MVC等其他模块时,无版本号的XSD(如spring-mvc.xsd)仍可正常访问,且各版本文件均存在。
  • 注意到Spring Security模块在2023年2月20日有更新记录,但未找到任何关于停用或移除无版本号spring-security.xsd的官方通知或公告。
  • 存档记录显示,2023年2月19日该无版本号XSD文件仍可正常访问。

内容的提问来源于stack exchange,提问作者tarunk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 18:06:39