Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active March 10, 2016 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save garystafford/6c009bf2aa6f463c7316 to your computer and use it in GitHub Desktop.
Save garystafford/6c009bf2aa6f463c7316 to your computer and use it in GitHub Desktop.
@Autowired
@Output(OUTPUT)
private MessageChannel messageChannel;
@Value("${message}")
private String message;
@Description("Post new reservations using Spring Cloud Stream")
@RequestMapping(method = POST)
public void acceptNewReservations(@RequestBody Reservation r) {
Message<String> build = withPayload(r.getReservationName()).build();
this.messageChannel.send(build);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment