Vue和SpringBoot sql错Cause: java.sql.SQLSyntaxErrorException: Unknown column 'cus_name' in 'field list

问题:
1、使用Vue和SpringBoot在后台测试时报sql语句错,但明明没有写sql,错误如下:## The error may exist in cc/mrbird/febs/system/dao/CusMapper.java (best guess)
### The error may involve cc.mrbird.febs.system.dao.CusMapper.insert-Inline
#
## The error occurred while setting parameters**
### SQL: INSERT INTO customer ( cus_name, cusPhone, cusAddress, status, createDate, modifyDate ) VALUES ( ?, ?, ?, ?, ?, ? )
##
# Cause: java.sql.SQLSyntaxErrorException: Unknown column ‘cus_name’ in ‘field list’******
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column ‘cus_name’ in ‘field list’

解决方案:
Vue和SpringBoot sql错Cause: java.sql.SQLSyntaxErrorException: Unknown column 'cus_name' in 'field list_第1张图片
在实体类中加注解@TableField(“列名”)。

你可能感兴趣的:(Vue)