Suchergebnisse für Anfrage "spring-restcontroller"
Benutzerdefinierte JSON-Serialisierung im Frühjahr
Ich habe drei Entitäten: @Entity class Group { @id Long id; String name; String faculty; @OneToMany(mappedBy = "group", fetch = FetchType.LAZY, cascade = CascadeType.ALL ) List<Schedule> scedule; ... } @Entity class Schedule { @id Long id; ...
415 Nicht unterstützter MediaType für POST-Anforderung in der Frühjahrsanwendung
Ich habe eine sehr einfacheSpring Anwendung (NICHT Spring Boot). Ich habe eine GET- und eine POST-Controller-Methode implementiert. dasGET -Methode funktioniert gut. Aber diePOST wirft415 Unsupported MediaType. Schritte zum Reproduzieren sind ...
@ JsonProperty funktioniert nicht für den Inhaltstyp: application / x-www-form-urlencoded
Die REST-API akzeptiert den Eingabe-Inhaltstyp: application / x-www-form-urlencoded, wenn sie einem Java-Objekt wie @ zugeordnet is public class MyRequest { @JsonProperty("my_name") private String myName; @JsonProperty("my_phone") private ...
Seite 2 von 2