跳到主要内容

前言

QWen Plus 中英对照 Preface

本章包括:

要求

本节详细说明了兼容的 JavaSpring Framework 版本。

兼容的 Java 版本

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

Spring Framework 的兼容版本

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

代码规范

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

在本参考指南中,int 命名空间前缀用于 Spring Integration 的核心命名空间支持。每种 Spring Integration 适配器类型(也称为模块)提供自己的命名空间,通过使用以下约定进行配置:

以下示例展示了 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>
xml

有关 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 的。