Skip to content

Commit

Permalink
Replace @controller with @RestController in MainController
Browse files Browse the repository at this point in the history
The @controller annotation was replaced with @RestController in MainController.java file. This change allows the controller to automatically serialize the response objects into JSON, simplifying the controller's implementation by removing the need to manually handle the serialization.
  • Loading branch information
nawaphonOHM committed Mar 10, 2024
1 parent 54c7cfc commit 4376fb4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.UUID;

@Controller
@RestController
public class MainController {

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

0 comments on commit 4376fb4

Please sign in to comment.