Created
February 5, 2014 20:16
-
-
Save knalli/8832138 to your computer and use it in GitHub Desktop.
Blog: Migration Spring Integration 2.x to 3.x with Jackson2 (finally): http://www.knallisworld.de/blog/2014/02/05/expose-a-java-method-with-amqp-using-spring-integration/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service("api") | |
public class ApiImpl { | |
public Response handle(Request request) { | |
// Do some stuff and return a response object | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service("api") | |
public class ApiImpl { | |
@ServiceActivator | |
public Response handle(@Payload Request request) { | |
// Do some stuff and return a response object | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans> | |
<int-amqp:inbound-gateway | |
connection-factory="connectionFactory" | |
request-channel="requestChannel" | |
reply-channel="resultChannel" | |
error-channel="errorChannel" | |
queue-names="queue"/> | |
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans> | |
<int:channel id="requestChannel"/> | |
<int:channel id="resultChannel"/> | |
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans> | |
<int:channel id="requestChannel"/> | |
<int:channel id="requestChannelJson"/> | |
<int:channel id="resultChannel"/> | |
<int:channel id="resultChannelJson"/> | |
<int:chain input-channel="requestChannelJson" output-channel="requestChannel"> | |
<int:json-to-object-transformer type="your.package.to.Request"/> | |
</int:chain> | |
<int:chain input-channel="resultChannel" output-channel="resultChannelJson"> | |
<int:object-to-json-transformer/> | |
</int:chain> | |
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans> | |
<int:service-activator ref="api" input-channel="requestChannel" output-channel="resultChannel" /> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment