U5. Spring

U5. Spring

University

25 Qs

quiz-placeholder

Similar activities

ITSY201-Fundamentals of computer security-Practice Chapter 1 2 3

ITSY201-Fundamentals of computer security-Practice Chapter 1 2 3

University

30 Qs

Linux Directory Structures

Linux Directory Structures

10th Grade - University

20 Qs

Top 20 Most Commonly Used Ports

Top 20 Most Commonly Used Ports

9th Grade - University

20 Qs

INSTALACIÓN DE SOFTWARE

INSTALACIÓN DE SOFTWARE

University

20 Qs

Python if/else

Python if/else

University

20 Qs

Modelo OSI e TCPIP

Modelo OSI e TCPIP

University

20 Qs

CO2517

CO2517

University

25 Qs

CIS 103 MID-TERM REVIEW

CIS 103 MID-TERM REVIEW

University

21 Qs

U5. Spring

U5. Spring

Assessment

Quiz

Computers

University

Easy

Created by

Héctor L

Used 26+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What HTTP status code is returned when a POST request successfully creates a resource?

200 OK

201 Created

204 No Content

400 Bad Request

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Spring Boot, what annotation is used to mark a class as a REST controller?

@Controller

@RestController

@Service

@RequestMapping

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main advantage of using the DAO (Data Access Object) pattern?

It speeds up SQL query execution

It hides data access complexity and facilitates unit testing

It allows direct database access from the controller

It eliminates the need for an ORM like Hibernate

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used in Spring Boot to handle HTTP POST requests?

@PostHandler

@PostMapping

@PostRequest

@HttpPost

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the @PathVariable annotation in a Spring Boot controller?

It binds a method parameter to a value in the URL path

It injects dependencies into a method

It validates the HTTP request body

It specifies the default HTTP method for a controller

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which annotation is used to inject dependencies automatically in Spring?

@Inject

@Dependency

@Autowired

@ComponentScan

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the @JsonIgnore annotation do in a Spring Boot application?

Prevents a field from being converted to JSON when serializing an object

Forces a field to always be included in JSON responses

Ignores errors in JSON requests

Converts Java objects to XML

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?