Home > database >  Getting "[Unresolved compilation problem: Type mismatch: cannot convert from TreeMap<String,
Getting "[Unresolved compilation problem: Type mismatch: cannot convert from TreeMap<String,

Time:01-04

I'm new in Java. Please help me

This is my restful controller

This is the model

The error when I run the code

CodePudding user response:

Your controller return type is String, and it return getGadaianDetails(), but method getGadaianDetails return type is TreeMap.

you can make your controller return type as TreeMap, this may require re-agreement with the front-end on the data structures that interact.

Or, you can modify the implementation of the getGadaianDetails method so that it returns a string

  • Related