字體:小 中 大 | |
|
|
2011/08/24 11:02:37瀏覽96|回應0|推薦0 | |
# Runtime : # java.sql.SQLException:Value '0000-00-00' can not be represented as java.sql.Date 問題: 数据表中有记录的time字段(属性为timestamp)其值为:“0000-00-00 00:00:00”,會發生以上錯誤 姐絕: 给jdbc url加上 zeroDateTimeBehavior参数: datasource.url=jdbc:mysql://localhost:3306/pe?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull # 程式執行時,取得當前路徑: Thread.currentThread().getContextClassLoader().getResource("")
|
|
( 休閒生活|其他 ) |