Use the "versionless" XSDs, please.

博客建议在Spring配置中使用无版本的XSD,因其会映射到应用所用框架的当前版本。应用和工具不应从网络获取XSD,因为这些模式已包含在JAR中。Spring团队应在Spring 5.0去掉有版本的模式,使用无版本XSD便于在升级库时发现不兼容问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

From: https://stackoverflow.com/questions/20894695/spring-configuration-xml-schema-with-or-without-version/20900801#20900801

It is recommended to use the "versionless" XSDs, because they're mapped to the current version of the framework you're using in your application.

Applications and tools should never try to fetch those XSDs from the web, since those schemas are included in the JARs. If they do, it usually means your app is trying to use a XSD that is more recent than the framework version you're using, or that your IDE/tool is not properly configured.

Anyway the Spring team should drop the versioned schemas for Spring 5.0, see SPR-13499.

another post:

Consider using versionless xsd's. This will make the tooling pick up the version of the xsd matching the version of the spring jar you are using(look at the spring.schemas file in your jar). In case of any incompatibility when you upgrade your spring libraries(which should really be rare) you should be able to catch it during build.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值