JAVAMS06 Integrating Pub/Sub with Spring Reviews
11925 reviews
Ankush Kumar V. · Reviewed almost 3 years ago
Rajesh D. · Reviewed almost 3 years ago
harika r. · Reviewed almost 3 years ago
Aleksandar D. · Reviewed almost 3 years ago
Ritesh K. · Reviewed almost 3 years ago
Enrique T. · Reviewed almost 3 years ago
Delpiano B. · Reviewed almost 3 years ago
Hieu D. · Reviewed almost 3 years ago
Mayank D. · Reviewed almost 3 years ago
Vikrant K. · Reviewed almost 3 years ago
Veshal K. · Reviewed almost 3 years ago
Chakali S. · Reviewed almost 3 years ago
Somesh K. · Reviewed almost 3 years ago
Pranita D. · Reviewed almost 3 years ago
Code does not compile payload.setName(name); payload.setMessage(message); public class FrontendController { @Autowired private GuestbookMessagesClient client; @Value("${greeting:Hello}") private String greeting; @Autowired private OutboundGateway outboundGateway; @GetMapping("/") public String index(Model model) { if (model.containsAttribute("name")) { String name = (String) model.asMap().get("name"); model.addAttribute("greeting", String.format("%s %s", greeting, name)); } model.addAttribute("messages", client.getMessages().getContent()); return "index"; } @PostMapping("/post") public String post(@RequestParam String name, @RequestParam String message, Model model) { model.addAttribute("name", name); if (message != null && !message.trim().isEmpty()) { // Post the message to the backend service GuestbookMessage payload = new GuestbookMessage(); payload.setName(name); payload.setMessage(message); client.add(payload); // At the very end, publish the message outboundGateway.publishMessage(name + ": " + message); } return "redirect:/"; } }
Ted E. · Reviewed almost 3 years ago
Fulvio F. · Reviewed almost 3 years ago
Devang S. · Reviewed almost 3 years ago
It would be more better if you could give ore explanations to the methods and annotations we use.
Adonay E. · Reviewed almost 3 years ago
Gaurav P. · Reviewed almost 3 years ago
Sundar K. · Reviewed almost 3 years ago
Vedant K. · Reviewed almost 3 years ago
Jose R. · Reviewed almost 3 years ago
Rahadian P. · Reviewed almost 3 years ago
website is not working, getting error Sat May 06 06:20:13 UTC 2023 There was an unexpected error (type=Internal Server Error, status=500). Exception evaluating SpringEL expression: "message.name" (template: "index" - line 42, col 19)
Uppu A. · Reviewed almost 3 years ago
Bharath K. · Reviewed almost 3 years ago
We do not ensure the published reviews originate from consumers who have purchased or used the products. Reviews are not verified by Google.