
报错
SuperBearL
这个作者很懒,什么都没留下…
展开
-
springboot Long类型ID回传前端时,出现精度损失导致数值不对
问题描述:后端把Long类型的数据传给前端,前端可能会出现精度丢失的情况。例如:201511200001725439这样一个Long类型的整数,传给前端后会变成201511200001725440解决方法:把Long类型再回传时强转为String通过@JsonSerialize注解自动转换这里主要描述第二种方法如何实现只需要转换的字段加上注解,并指定using为 ToStringSerializer.class@JsonSerialize(using = ToStringSerialize原创 2021-06-29 00:40:31 · 685 阅读 · 0 评论 -
Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be a
jdbc.driver=com.mysql.cj.jdbc.Driverjdbc.url=jdbc:mysql://localhost:3306/AppStore?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true转载 2019-06-30 20:05:11 · 3899 阅读 · 0 评论