2 pièce(s) jointe(s)
[spring boot] l'api rest reçois un objet null !
bonjour
j'envois une requête post avec angular :
Code:
1 2 3 4 5 6
|
public ajouterClient(client:Client){
return this.http.post("http://localhost:8080/ajouterClient",client).map(
resp=>resp.json()
);
} |
au niveau du api rest que je crée avec spring boot je recois un un null
lorsque je fais un console.log au niveau d'angular l'objet est non null :
Pièce jointe 375263
au niveau de spring boot :
Code:
1 2 3 4 5 6
|
@PostMapping(value="/ajouterClient")
public Client ajouterClient(@RequestBody Client c) {
System.out.println("--->"+c.getNom());
return this.repo.save(c);
} |
je reçois :
Pièce jointe 375267
merci d'avance !