Search Header Logo

Controller Spring

Authored by Kiều Thị

Professional Development

1st - 2nd Grade

Used 9+ times

Controller Spring
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Để lấy số 2 trong đường URI sau ta sử dụng method nào sau đây.

/customers/3/user/2

@GetMapping("/customers/3/user/2{userId}")

public String demo(@PathVariable String userId)

@GetMapping("/customers/{customerId}/user/{userId}")

public String demo(@PathVariable Long userId)

@GetMapping("/customers/{customerId}/2")

public String demo(@RequestMapping Long userId)

Không có đáp án đúng

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Để thêm dữ liệu cho view trong Spring, cách nào sau đây không dùng được

sử dụng phương thức addAttribute của ModelMap

sử dụng phương thức addAttribute của Model

sử dụng phương thức addObject của ModelAndView

sử dụng phương thức addAttribute của ModelAndView

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

** đại diện cho điều gì trong đoạn đường dẫn?

Đại diện cho 0 hoặc nhiều đoạn đường dẫn

Đại diện cho 0 hoặc nhiều ký tự

Đại diện cho 0 hoặc nhiều ký tự đặc biệt

Đại diện cho 0 hoặc nhiều ký tự số hoặc chữ

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Controller, việc sử dụng @RequestAttribute nhằm mục đích gì?

Khởi tạo tham số

Lấy các thuộc tính đã có

Lấy phương thức trong controller

Lấy 1 tham số trong controller

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Controller, việc sử dụng tiền tố "redirect" nhằm mục đích gì?

Chuyển hướng đến một phương thức

Chuyển hướng đến 1 trang jsp

Gửi 1 request mới

Không có đáp án đúng

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?