Suchergebnisse für Anfrage "spring-restcontroller"

0 die antwort

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; ...

6 die antwort

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 ...

4 die antwort

@ 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 ...

TOP-Veröffentlichungen