问题

  通过中文查询时得到的结果集为0,这主要是编码的问题

解决方法:

   可以在连接mysql数据库时在连接字符串中进行设置如:

      url="jdbc:mysql://localhost:3306/db_pos?useUnicode=true&characterEncoding=utf8"

  这样就可以了

参考:http://hbyxfy.iteye.com/blog/505826

 

相关文章:

  • 2022-12-23
  • 2021-10-23
  • 2021-11-30
  • 2022-12-23
  • 2021-11-04
  • 2021-06-18
猜你喜欢
  • 2021-07-11
  • 2021-12-20
  • 2022-01-31
相关资源
相似解决方案