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
Order对象使用了Builder模式,被lombok的@builder修饰,在OrderRepository中的byId方法中使用了return (rs, rowNum) -> objectMapper.readValue(rs.getString("JSON_CONTENT"), Order.class); 由于使用Builder模式,会生成全参数的构造函数,在对此对象赋值的时候,报错,没有无参的构造函数。 盼复!
The text was updated successfully, but these errors were encountered:
我本地运行./local-build.sh是ok的,参考项目中的lombok.config文件,其中的"lombok.anyConstructor.addConstructorProperties=true"会为全参构造函数自动生成"@java.beans.ConstructorProperties“进而让jackson自动找到该全参构造函数而不是默认构造函数。所以,是不是你IDE中的lombok没有配置对?
Sorry, something went wrong.
No branches or pull requests
Order对象使用了Builder模式,被lombok的@builder修饰,在OrderRepository中的byId方法中使用了return (rs, rowNum) -> objectMapper.readValue(rs.getString("JSON_CONTENT"), Order.class);
由于使用Builder模式,会生成全参数的构造函数,在对此对象赋值的时候,报错,没有无参的构造函数。
盼复!
The text was updated successfully, but these errors were encountered: