Leave a Reply

84 Comments on "Spring Boot Quick Start 19 – Creating a new resource using POST"

Notify of
avatar

Jeremy Blevins
Guest
Jeremy Blevins
3 months 23 days ago

How are you running your server with no main(String args[]) method? I have the same code as you and mine will not even launch because there's no main method.

Steven Green
Guest
Steven Green
3 months 18 days ago

There is a main method since it is Spring Boot

Sovik Guha Biswas
Guest
Sovik Guha Biswas
3 months 29 days ago

@PostMapping("/topics") does the trick ,working fine

sujith chanda
Guest
sujith chanda
4 months 3 days ago
can some one help me i have the same code but i cant do post method i see the below error{ "timestamp": 1516629766870, "status": 400, "error": "Bad Request", "exception": "org.springframework.http.converter.HttpMessageNotReadableException", "message": "JSON parse error: Can not construct instance of javabrainscourseapi.topic.Topic: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of javabrainscourseapi.topic.Topic: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)n at [Source: java.io.PushbackInputStream@2c9fae1e; line: 2, column:… Read more »
曹玮
Guest
曹玮
6 months 23 days ago

I remember that in one of our tutorials, you corrected that if the there is no default mapping method, If just put url in the request mapping annotation, it will mapping all http request method, not only GET. Please let me know if I am wrong.

曹玮
Guest
曹玮
6 months 23 days ago

I remember that in one of our tutorials, you corrected that if the there is no default mapping method, If just put url in the request mapping annotation, it will mapping all http request method, not only GET. Please let me know if I am wrong.

SriSri TV
Guest
SriSri TV
7 months 20 hours ago

Great tutorials, easy to follow.. but one thing, kindly increase the code font size so that it'll be easily visible on phone

SriSri TV
Guest
SriSri TV
7 months 1 day ago

Great tutorials, easy to follow.. but one thing, kindly increase the code font size so that it'll be easily visible on phone

Sandeep Patil
Guest
Sandeep Patil
8 months 15 days ago

Great tutorials ..

Sandeep Patil
Guest
Sandeep Patil
8 months 15 days ago

Great tutorials ..

karthik mucheli
Guest
karthik mucheli
8 months 18 days ago

what if post body has garbage value ? non json or say, new parameter

1 2 3 6
wpDiscuz