Configuration
Spring Integration 提供了许多配置选项。您选择哪一个取决于您的特定需求以及您更喜欢在什么级别工作。与 Spring 框架一样,您可以混合和匹配各种技术以解决手头的问题。例如,您可以为大多数配置选择基于 XSD 的命名空间,并将其与几个使用注释配置的对象结合起来。尽可能,两者提供一致的命名。XSD 模式定义的 XML 元素与注释名称匹配,这些 XML 元素的属性与注释属性名称匹配。您还可以直接使用 API,但我们希望大多数开发人员选择一个较高级别的选项,或基于命名空间的和注释驱动的配置的组合。
Spring Integration offers a number of configuration options. Which option you choose depends upon your particular needs and at what level you prefer to work. As with the Spring framework in general, you can mix and match the various techniques to suit the problem at hand. For example, you can choose the XSD-based namespace for the majority of configuration and combine it with a handful of objects that you configure with annotations. As much as possible, the two provide consistent naming. The XML elements defined by the XSD schema match the names of the annotations, and the attributes of those XML elements match the names of annotation properties. You can also use the API directly, but we expect most developers to choose one of the higher-level options or a combination of the namespace-based and annotation-driven configuration.