参考  https://blog.csdn.net/xf_zhen/article/details/80911947

constructor-arg:通过构造函数注入
property:通过setter对应的方法注入

新增几个字段后,在查询时报错

Mybatis 和 自定义构造函数 冲突的解决办法

 Error instantiating class com.finance.api.domain.pay.PayPo with invalid types (...) or values (...)

 

原因可能有如下:

1.pojo没有默认构造器;

2.mybatis中使用了<constructor>,指定了有参构造器,需要在pojo显示新增有参构造器

相关文章:

  • 2022-12-23
  • 2021-09-11
  • 2022-02-05
  • 2021-04-14
  • 2022-02-02
  • 2022-01-21
  • 2022-12-23
  • 2021-12-29
猜你喜欢
  • 2022-12-23
  • 2021-09-20
  • 2021-09-20
  • 2022-01-07
  • 2022-12-23
相关资源
相似解决方案