Leave a Reply

23 Comments on "Spring Boot Quick Start 12 – Returning Objects From Controller"

Notify of
avatar

tyranitarxd
Guest
tyranitarxd
15 days 5 hours ago

Does spring ignore the "private" keyword on the Topic obects you were returning as JSON? Does it return all data members of the object by default?

Meharnath Borigi
Guest
Meharnath Borigi
1 month 12 days ago

I am having trouble in returning JSON data. tried adding maven as well Jackson dependencies but still no luck.Error received: java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.ArrayListAny help is highly appreciated 🙁

Meharnath Borigi
Guest
Meharnath Borigi
1 month 12 days ago

When I access the application on Chrome, I no longer receiving the error. probably an issue Safari browser

SRINU DWARAKACHARLA
Guest
SRINU DWARAKACHARLA
1 month 12 days ago

When ever i run the my first controller i got this exception java.net.BindException: Address already in use: bind

Parikshit Murria
Guest
Parikshit Murria
2 months 10 days ago

Hi Koushik,Thank you for such a wonderful tutorial.Could you please explain why a no-arg constructor is required in Topic class. If i remove it and call GET /topics API, it throws an error saying no constructor matched. Why is thjs happening ?Thank you.

Ben H
Guest
Ben H
2 months 13 days ago

I could return the String ok but the Topic object just came back with White Label Error. It complained about converting Array to ArrayList. Adding this dependency solved the issue:<dependency>    <groupId>com.fasterxml.jackson.core</groupId>    <artifactId>jackson-databind</artifactId>    <version>2.5.0</version></dependency>

alaapable
Guest
alaapable
2 months 26 days ago

Hi Koushik,I followed the exactly same steps as mentioned in the tutorial but getting the below exception:java.lang.IllegalArgumentException: No converter found for return value of type: class java.util.Arrays$ArrayList at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:188) ~[spring-webmvc-4.3.4.RELEASE.jar:4.3.4.RELEASE] Can you please tell me what went wrong?For the HelloController I am getting the response fine but not for the TopicController. Please help!Thanks in anticipation.

Samuel Abramov
Guest
Samuel Abramov
3 months 3 days ago

Thank you so much

Arun
Guest
Arun
3 months 13 days ago

At 7:11 the key in JSON are not exactly the name of properties but in actual those are values of getter and setter methods after omitting the get and set from the method name. Even if we change the properties in the class but keep the name of getter and setter same we will not see any change in the JSON. Anyways Many thanks to Kaushik, he is a genious.

Tarık Nural
Guest
Tarık Nural
3 months 14 days ago

I have been only working on finding this for 3 days. Tried every spring examples online got several bullshit errors and could not find out what they were about. You are just amazing. Thank you for your effort.

Vikash Kumar
Guest
Vikash Kumar
4 months 20 days ago

I got the solution, Just rebuilt the project and error is gone. Thank you for your videos, it is so helpful. Expecting more Real time projects on Spring. Thank you for your videos.

wpDiscuz