spring jdbc queryForList数据库字段空值报错

List<Map<String, Object>> listData = this.namedJdbcTemplate.queryForList(sql.toString(), paramSource);

 

我数据库字段publishtime为datetime类型的,我数据库是Mysql,当publishtime为0000:00:00 00:00:00时候就会报错。

 

2012-02-15 16:25:15,454 DEBUG [com.mchange.v2.c3p0.impl.NewPooledConnection] - <com.mchange.v2.c3p0.impl.NewPooledConnection@2ceded handling a throwable.>
java.sql.SQLException: Value '2120000-00-00 00:00:00:/static/upload/2011/11/11/_201111111824531321007093112.png2<p>
	鎵?/p>
浣犳槸鍧忎汉2011-11-11 18:24:532011-11-11 18:24:53鍝堝搱澶у湴020
 

你可能感兴趣的:(Spring JDBC)