Created
July 29, 2018 15:55
-
-
Save chathurangat/bbe75a0901cc6ac3c3dbf8a7047094b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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