-
Sep 14th, 2011, 04:46 PM
#1
REST redirect response with spring integration
Hi,
I am new to spring integration and I am prototyping a few scenarios. I want to return a 302 redirect from a REST endpoint. Here is my config:
<int-http:inbound-gateway request-channel="input" name="/test"
supported-methods="GET" />
<int:channel id="input" />
<int:service-activator ref="httpHandler"
input-channel="input" />
And here is the public method from my handler class:
public void handleMessage(Message<?> message) throws MessagingException {
System.out.println(System.currentTimeMillis());
System.out.println(this.getClass().getName() +": " + message);
if(shouldRedirect(message.getPayload())){
//TODO redirect - 302 with Location header
} else {
//TODO return - 200
}
}
How would I return a 302? Should I use MVC for this? Is there any examples of something like this?
Thanks for your help in advance.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules