報錯 org.springframework.dao.DataIntegrityViolationException: Error attempting to get column


錯誤

dao.DataIntegrityViolationException: Error attempting to get column 'owner_name' from result set.  Cause: java.sql.SQLDataException: Cannot determine value type from string '大老板'

原因:

  • 數據庫字段與實體類字段類型不匹配
  • 如果代碼中使用了union,union中的每個sql字段必須一一對應,當對應的數據類型有誤時則會報上述異常


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM