Type definition error: [simple type, class com.firstSpringBoot.restApi.model.User]
During get request, Jackson library conversion of Bean to JSON led to Type definition error after the bean file ‘User’ was renamed from ‘User’ to UserDetails and back to ‘User’. I have been using other beans with the name ‘Course’ and ‘Employee’ for get request and they seems to be working fine. I tried refactoring the bean file with 3 names – ‘User’, ‘UserDetails’, ‘UserDetail’. All of them are giving the same error. Only return method of User controller that is able to return the desired result is as below –