前言

要求

本节详细介绍了兼容的 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 适配器类型(也称为 `模块`)都提供其自己的命名空间,通过以下约定进行配置:

以下示例展示了 `int`、`int-event` 和 `int-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 Framework,倾向于约定优于配置,旨在让您尽快启动和运行。

您可以使用 start.spring.io 生成一个基本项目(添加 `integration` 作为依赖项),或者遵循其中一个 “入门”指南,例如 集成数据入门。这些指南更易于理解,并且非常注重任务,其中大多数都基于 Spring Boot。

© . This site is unofficial and not affiliated with VMware.