To reduce the configuration needed for stream related channel adapters there is a namespace defined. The following schema locations are needed to use it.
<?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/integration/stream" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/integration/stream http://www.springframework.org/schema/integration/stream/spring-integration-stream-1.0.xsd">
To configure the inbound channel adapter the following code snippet shows the different configuration options that are supported.
<stdin-channel-adapter id="adapterWithDefaultCharset"/> <stdin-channel-adapter id="adapterWithProvidedCharset" charset="UTF-8"/>
To configure the outbound channel adapter you can use the namespace support as well. The following code snippet shows the different configuration for an outbound channel adapters.
<stdout-channel-adapter id="stdoutAdapterWithDefaultCharset" channel="testChannel"/> <stdout-channel-adapter id="stdoutAdapterWithProvidedCharset" charset="UTF-8" channel="testChannel"/> <stderr-channel-adapter id="stderrAdapter" channel="testChannel"/> <stdout-channel-adapter id="newlineAdapter" append-newline="true" channel="testChannel"/>