Skip to content

Instantly share code, notes, and snippets.

@regunathanr
Created August 9, 2016 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save regunathanr/bc59ab15d9b688c9d7e473de018943e0 to your computer and use it in GitHub Desktop.
Save regunathanr/bc59ab15d9b688c9d7e473de018943e0 to your computer and use it in GitHub Desktop.
@RestController
@EnableBinding(Processor.class)
public class RestApiEndPoint {
public String message="hello";
@ServiceActivator(inputChannel = Processor.INPUT, outputChannel = Processor.OUTPUT)
public String log(String message) {
this.message=message;
System.out.println(message);
return message;
}
@RequestMapping("/")
public String index() {
System.out.println(this.message);
return this.message;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment