跳到主要内容
版本:7.0.2

前言

DeepSeek V3 中英对照 Preface

本章内容包括:

系统要求

本节详细介绍了兼容的 JavaSpring Framework 版本。

兼容的 Java 版本

对于 Spring Integration 7.0.x,最低兼容的 Java 版本是 Java SE 17。不支持更早版本的 Java。

Spring Framework 的兼容版本

Spring Integration 7.0.x 需要 Spring Framework 7.0 或更高版本。

代码规范

Spring Framework 2.0 引入了对命名空间的支持,这简化了应用程序上下文的 XML 配置,并让 Spring Integration 能够提供广泛的命名空间支持。

在本参考指南中,int 命名空间前缀用于表示 Spring Integration 的核心命名空间支持。每种 Spring Integration 适配器类型(也称为 module)都提供了自己的命名空间,这些命名空间遵循以下约定进行配置:

以下示例展示了 intint-eventint-stream 命名空间的使用:

<?xml version="1.0" encoding="UTF-8"?>
<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:int-webflux="http://www.springframework.org/schema/integration/webflux"
xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xsi:schemaLocation="
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
http://www.springframework.org/schema/integration/webflux
https://www.springframework.org/schema/integration/webflux/spring-integration-webflux.xsd
http://www.springframework.org/schema/integration/stream
https://www.springframework.org/schema/integration/stream/spring-integration-stream.xsd">

</beans>

有关 Spring Integration 命名空间支持的详细说明,请参阅命名空间支持

备注

命名空间前缀可以自由选择。您甚至可以选择完全不使用任何命名空间前缀。因此,您应该采用最适合您应用程序的约定。但请注意,SpringSource Tool Suite™ (STS) 对 Spring Integration 使用的命名空间约定与本参考指南中使用的约定相同。

本指南中的约定

在某些情况下,为了便于在指定长全限定类名时进行格式化,我们会将 org.springframework 缩写为 o.s,将 org.springframework.integration 缩写为 o.s.i,例如 o.s.i.transaction.TransactionSynchronizationFactory

反馈与贡献

对于操作指南类问题或诊断调试问题,我们建议使用 Stack Overflow。点击此处查看最新问题列表。如果您确信 Spring Integration 存在问题或希望提出功能建议,请使用 GitHub Issues

如果您已有解决方案或建议修复,可以在 GitHub 上提交拉取请求。但请注意,除最基础的问题外,我们期望在问题跟踪系统中创建工单,以便进行讨论并为后续参考保留记录。

更多详细信息请参阅 CONTRIBUTING 中的指南以及顶级项目页面。

快速开始

如果你刚开始使用 Spring Integration,可以先创建一个基于 Spring Boot 的应用程序。Spring Boot 提供了一种快速(且遵循特定理念)的方式来创建可用于生产环境的 Spring 应用程序。它基于 Spring 框架,推崇约定优于配置,旨在让你能够尽快上手并运行起来。

你可以使用 start.spring.io 来生成一个基础项目(添加 integration 作为依赖),或者参考 "入门" 指南中的一篇,例如《开始构建数据集成》。这些指南不仅易于理解,而且非常注重任务导向,其中大多数都基于 Spring Boot。