-1

When I sysout the RestModel in Java code, it's printed out like this.

[com.my.model.RestModel@14ab40d2]

Is there a way to display the Detail? (like Json?)

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Ian Cho
  • 89
  • 6
  • Implement toString. Consider lombok (will not be JSON though) – Michael Dec 02 '21 at 12:50
  • 1
    Does this answer your question? [How do I print my Java object without getting "SomeType@2f92e0f4"?](https://stackoverflow.com/questions/29140402/how-do-i-print-my-java-object-without-getting-sometype2f92e0f4) – OH GOD SPIDERS Dec 02 '21 at 12:51

1 Answers1

0

You can override your model's toString() method and have it print out the information you want in the format you want.

Mureinik
  • 297,002
  • 52
  • 306
  • 350