jdbc 报错 (org.springframework.jdbc.IncorrectResultSetColumnCountException: Incorrect column count: )

版权声明:版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a458383896/article/details/85335111

在使用   

SingleColumnRowMapper.newInstance() 

 的时候报错

jdbc 报错信息: 

org.springframework.jdbc.IncorrectResultSetColumnCountException: Incorrect column count: expected 1, actual 3

其实这样是不对的,

应该为

new BeanPropertyRowMapper<>()

猜你喜欢

转载自blog.csdn.net/a458383896/article/details/85335111