使用MyBatis框架时发现的一些小bug
在大配置MyBatis.xml中: ?不能有空節點屬性 ,否則啟動服務器后點擊登錄沒有反應。
?
異常問題:
ause: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp:
解決辦法:
HTTP Status 500 - Request processing failed; nested exception is org.springframework.dao.TransientDataAccessResourceException: Error attempting to get column 'coupon_end_time' from result set. Cause: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp
? ? 問題:頁面展示信息是報錯,因為數據庫中某時間戳的列值為0000-00-00 00:00:00,所有報錯
? ? 原因:因為我時間戳的默認值為,0000-00-00 00:00:00,我刪除了默認之就好了
?
轉載于:https://www.cnblogs.com/java-123/p/9914828.html
總結
以上是生活随笔為你收集整理的使用MyBatis框架时发现的一些小bug的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 编程历史
- 下一篇: RF新手常见问题总结--(基础篇)