No serializer found for class - json格式化异常

exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class .

通常因为java bean没有getter和setter方法,添加gettter/setter方法即可。