Java在用MultipartFile上传图片文件时有Jackson方面的问题
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class java.io.FileDescriptor and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com.hc.mall.result.R["data"]->......
简单的一行禁止序列化,spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
加上之后运行继续报错MultipartFile resource [file] cannot be resolved to absolute file path
如果网上的其他方法都无法解决,这时大概率是传递的值有问题或者return的有问题。