Which of the following is used to define RESTful APIs in Java Spring Boot?

Which of the following is used to define RESTful APIs in Java Spring Boot?

a) @GetMapping, @PostMapping
b) @HtmlMapping, @CssMapping
c) @Override, @Extension
d) @Table, @Column

Answer:

a) @GetMapping, @PostMapping

Explanation:

In Spring Boot, the annotations @GetMapping and @PostMapping are used to define routes for handling HTTP GET and POST requests in a REST API.

Reference:

Full Stack Web Development Quiz – MCQ Questions and Answers

Scroll to Top