@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