@Configuration
次のxmlがあり、この迷惑なxmlをクラスに置き換えたい
<int:gateway id="someActionGateway "
service-interface="x.y.z.SomeActionGateway"
default-request-channel="some-action-channel-raw" />
<int:channel id="some-action-channel-raw" />
<int:header-enricher input-channel="some-action-channel-raw" output-channel="some-action-to-json-channel">
<int:header name="someAction" value="sendSomething"/>
</int:header-enricher>
<int:channel id="some-action-to-json-channel" />
<int:object-to-json-transformer
input-channel="some-action-to-json-channel" output-channel="some-action-outbound-channel"
content-type="text/x-json" />
<int:channel id="some-action-outbound-channel" />
<int-amqp:outbound-channel-adapter
channel="some-action-outbound-channel" exchange-name="some-action-exchange"
routing-key="someAction.routing.key" amqp-template="amqpTemplate"
mapped-request-headers="*">
</int-amqp:outbound-channel-adapter>
<rabbit:direct-exchange name="some-action-exchange"
auto-delete="false" durable="true">
<rabbit:bindings>
<rabbit:binding queue="some-action-queue" key="someAction.routing.key" />
</rabbit:bindings>
</rabbit:direct-exchange>
そして私のゲートウェイ:
public interface SomeActionGateway {
@Gateway
public void sendSomething(@Payload SomeDto dto);
}
spring-amqp の構成アノテーション付きクラスを既に使用していますが、正常に動作します。Spring Integration 構成で同じことを行うにはどうすればよいですか?
PS: Spring 3.2 と Spring Integration 3.0 を使用しています。