logo

Crowdly

SEW8b 4xHIT Spring Boot

Looking for SEW8b 4xHIT Spring Boot test answers and solutions? Browse our comprehensive collection of verified answers for SEW8b 4xHIT Spring Boot at elearning.tgm.ac.at.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Ergänzen Sie die fehlenden Annotationen zum Unterschied MVC vs. REST (wenn keine Annotation fehlt, wählen Sie die Option "leer").

.s0 { color: #0033b3;}

.s1 { color: #080808;}

.s2 { color: #067d17;}

.s3 { color: #8c8c8c; font-style: italic;}

.s4, .s4 input, .s4 input:focus { color: #9E880D; }

@RequestMapping("/user")

public class UserController {

@GetMapping("/5")

public ModelAndView getUser5(@RequestParam String name) {

ModelAndView modelAndView = new ModelAndView();

modelAndView.setViewName("user");

modelAndView.addObject("name", name);

return modelAndView;

}

@GetMapping("/7")

public String getUser7(@RequestParam String name) {

return name;

}

}

View this question
Kreuzen Sie an welche Aussagen hinsichtlich der Unterschieds zwischen Spring MVC und REST zutreffend sind.
View this question

.s0 { color: #0033b3;}

.s1 { color: #080808;}

.s2 { color: #8c8c8c; font-style: italic;}

.s3 { color: #1750eb;}

.s4, .s4 input, .s4 input:focus { color: #9E880D; }

import jakarta.validation.constraints.*;

public class UserDto {

private Long id;

// Darf nicht nur aus Leerzeichen bestehen und maximal 100 Zeichen umfassen

    private String name;

// Darf nicht leer sein, muss eine Mindestlänge von 5 Zeichen haben und muss das Schema einer Email erfüllen

    private String email;

// Darf nicht null sein, muss zwischen den Werten 18 und 65 (inklusive) liegen

    private Integer age;

// Constructor, Getter und Setter

}

View this question
Kreuzen Sie richtige Aussagen zur Behandlung von Exceptions an:
View this question
Kreuzen Sie an, welche Aussagen bzgl. PUT zutreffen (Frage ziehlt auf den Unterschied zwischen POST, PUT und PATCH ab):
0%
0%
0%
View this question
Ordner Sie die Antwortstatuscodes ihren Beschreibungen zu:
View this question
Kreuzen Sie an, welche Aussagen bzgl. POST zutreffen (Frage ziehlt auf den Unterschied zwischen POST, PUT und PATCH ab):
View this question

Ergänzen Sie die fehlenden Annotationen, indem Sie aus dem Namen der Methoden die gesuchte CRUD-Operation interpretieren und die dazu passende Annotation angeben.

.s0 { color: #0033b3;}

.s1 { color: #080808;}

.s2 { color: #067d17;}

.s3, .s3 input, .s3 input:focus { color: #9E880D;}

.s4 { color: #8C8C8C;}

("/user")

public class UserController {

("/{id}")

public ResponseEntity<UserDto> updateUserName( Long id, String name) {

throw new UnsupportedOperationException("Not supported yet.");

}

public ResponseEntity<List<UserDto>> listUsers() {

throw new UnsupportedOperationException("Not supported yet.");

}

}

View this question

Welche Methoden müssen in DTOs mindestens existieren (impliziert erstellte Methoden zählen auch dazu), damit JSON De-/Serialisierung mit Jackson funktioniert:

.s0 { color: #0033b3;}

.s1 { color: #080808;}

.s2 { color: #067d17;}

.s4 { color: #8C8C8C;}

public class UserDto {

// Beispiel zur Frage

private Long id;

private String name;

// ... gesuchte Methoden

}

View this question

.s0, .s0 input, .s0 input:focus { color: #0033b3;}

.s1, .s1 input, .s1 input:focus { color: #080808;}

.s2, .s2 input, .s2 input:focus { color: #067d17;}

.s3, .s3 input, .s3 input:focus { color: #9E880D;}

.s4 { color: #8C8C8C;}

.s5 { color: #174AD4;}

.s6 { color: #871094;}

Ergänzen Sie die für Spring MVC mit Thymeleaf notwendigen Annotationen/Schlüsselwörter/Variablen/Literale (Pfad, z.B.: "/sayHello?name=Max").

public class HelloController {

@GetMapping("/sayHello")

public sayHello( String name, xyz) {

xyz.addAttribute("name", name);

return ;

}

}

hello.html

<!DOCTYPE HTML

>

<

html xmlns:th="http://www.thymeleaf.org"

>

<

body

>

<

p th:text="|Hello, ${name}!|"

/>

</

body

>

</

html

>

Bitte beantworten Sie alle Teile der Frage.
View this question

Want instant access to all verified answers on elearning.tgm.ac.at?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!