Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Slf4j
@EnableBinding(OrderSource.class)
@RestController
public class OrderController
{
@Autowired
private OrderSource source;
@PostMapping("/orders/publish")
public String publishOrder(@RequestBody Order order)
{
source.create().send(MessageBuilder.withPayload(order).build());
log.info(order.toString());
return "order_published";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.