ssm里面如何将mysql的timestamp转为java.lang.String
//javaprivateStringloginTime;//mysqlloginTimeTIMESTAMPCOMMENT'登录时间',//mybatismapper<r...
//java
private String loginTime;
//mysql
loginTime TIMESTAMP COMMENT'登录时间',
//mybatis mapper
<result column="loginTime" property="loginTime" javaType="java.lang.String" jdbcType="TIMESTAMP"/>
报错: 嵌套异常是java.sql.SQLException:值'0000-00-00 00:00:00'不能表示为java.sql.Timestamp 展开
private String loginTime;
//mysql
loginTime TIMESTAMP COMMENT'登录时间',
//mybatis mapper
<result column="loginTime" property="loginTime" javaType="java.lang.String" jdbcType="TIMESTAMP"/>
报错: 嵌套异常是java.sql.SQLException:值'0000-00-00 00:00:00'不能表示为java.sql.Timestamp 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询