(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value
时间: 2023-10-20 22:02:46 浏览: 314
"(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value" 这个错误是由于在反序列化过程中没有找到接受字符串参数的构造函数或工厂方法导致的。这意味着在将字符串转换为对象时,无法找到合适的构造函数来创建对象。为了解决这个问题,可以通过增加一个接受字符串参数的构造函数来手动赋值。例如,在给定的引用中,通过增加一个构造函数来手动赋值,可以解决这个问题。在这个构造函数中,使用ObjectMapper的readValue()方法将json字符串转换为SubmitParam对象,并手动赋值给相应的属性。这样,就可以成功反序列化字符串并创建对象了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [(although at least one Creator exiceParam` (although at leists): no String-argument constructor/fact](https://blog.csdn.net/Dongguabai/article/details/122559913)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [no String-argument constructor/factory method to deserialize from String val](https://blog.csdn.net/qq_30162239/article/details/86647164)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文