问题:
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’
解决方案:
在实体类中加注解@TableField(“列名”)。