当用createNativeQuery执行原生sql语句时,返回的数据json格式是只有值,没有键名的,在这种情况下要用Map.class对sql语句中的字段进行Map映射,这样返回的数据的json格式就是含有键和值

Query query = entityManager.createNativeQuery(queryString, Map.class);

相关文章:

  • 2022-02-27
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2022-02-05
  • 2021-06-13
猜你喜欢
  • 2021-12-06
  • 2021-12-13
  • 2021-09-09
  • 2022-12-23
  • 2022-01-13
  • 2021-11-28
相关资源
相似解决方案