Last active
July 30, 2018 14:53
-
-
Save chathurangat/a5341adb8c5139fbda66953ceea2de1c 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, @RequestParam("payment_mode") String paymentMode) | |
{ | |
source.create().send(MessageBuilder.withPayload(order).setHeader("payment_mode",paymentMode).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