Skip to content

Commit

Permalink
Update annotation in MainController from @controller to @RestController
Browse files Browse the repository at this point in the history
The update from @controller to @RestController in MainController.java allows automatic serialization of response objects into JSON. This simplifies the controller's implementation by obviating manual serialization handling.
  • Loading branch information
nawaphonOHM committed Mar 10, 2024
1 parent 52b05fd commit be5c4e8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.UUID;

@Controller
@RequestMapping("/")
@ResponseBody
@RestController
public class MainController {

private static final Logger logger = LoggerFactory.getLogger(MainController.class);
Expand Down

0 comments on commit be5c4e8

Please sign in to comment.