We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yml模式提交配置,参数为空null 会报空指针异常。 com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException)
null
com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException)
看代码应该就是这样设计的,同时properties模式不允许value为空。
代码里用的接收参数类型是Properties类型,Properties继承自Hashtable,Hashtable不允许value为null
但是确实有一些场景需要给一些参数设置成空null的。 能不能将Properties替换成hashMap或者其他的支持value为null的类型
样例代码 PropertyController.java public WebResp<String> saveProperties(@RequestParam("project") String project, @RequestParam("profile") String profile, @RequestParam("label") String label, @RequestBody Properties newProperties)
PropertyController.java
public WebResp<String> saveProperties(@RequestParam("project") String project, @RequestParam("profile") String profile, @RequestParam("label") String label, @RequestBody Properties newProperties)
The text was updated successfully, but these errors were encountered:
dyc87112
No branches or pull requests
yml模式提交配置,参数为空
null
会报空指针异常。com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException)
看代码应该就是这样设计的,同时properties模式不允许value为空。
代码里用的接收参数类型是Properties类型,Properties继承自Hashtable,Hashtable不允许value为null
但是确实有一些场景需要给一些参数设置成空
null
的。能不能将Properties替换成hashMap或者其他的支持value为
null
的类型样例代码
PropertyController.java
public WebResp<String> saveProperties(@RequestParam("project") String project, @RequestParam("profile") String profile, @RequestParam("label") String label, @RequestBody Properties newProperties)
The text was updated successfully, but these errors were encountered: