报错 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