原因1.查询时没有指定数据库

原因2:

数据库的字段  account_id    account_name

java的实体类:accountId   accountName

sql语句  : select * from account_t     

解决办法      

一、

由于查询结果的字段为account_id,account_name,在实体类中没有定义,所以查询结果为null

修改实体类为:account_id     account_name  问题得到解决  能正常的查询到数据

必须要有对应的get set方法

相关文章:

  • 2022-12-23
  • 2021-10-01
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
  • 2021-12-03
  • 2021-06-26
  • 2022-12-23
相关资源
相似解决方案