命名空间支持
Spring Batch Integration 版本在 1.3 版本中增加了专用的 XML 命名空间支持, 旨在提供更便捷的配置 经验。要使用命名空间,请添加以下内容 Spring XML Application 上下文的命名空间声明 文件:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:batch-int="http://www.springframework.org/schema/batch-integration"
xsi:schemaLocation="
http://www.springframework.org/schema/batch-integration
https://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd">
...
</beans>
以下示例展示了一个完整配置的 Spring XML 应用上下文文件 批处理整合:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:batch="http://www.springframework.org/schema/batch"
xmlns:batch-int="http://www.springframework.org/schema/batch-integration"
xsi:schemaLocation="
http://www.springframework.org/schema/batch-integration
https://www.springframework.org/schema/batch-integration/spring-batch-integration.xsd
http://www.springframework.org/schema/batch
https://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
https://www.springframework.org/schema/integration/spring-integration.xsd">
...
</beans>
在引用的 XSD 文件上附加版本号也是 允许。然而,由于无版本声明总是使用 最新的模式,我们通常不建议附加版本 编号与XSD名称相符。添加版本号 在更新Spring Batch时可能会引发问题 集成依赖,因为它们可能需要更新版本 XML模式的。
这批次积分XML 命名空间自 Spring 起已被弃用
6.0批次,并将在7.0版本中移除。 |