springBoot整合mybatis_plus时候,出现Unknown column ‘grade_id‘ in ‘field list‘

标题:springBoot整合mybatis_plus时候,出现Unknown column ‘grade_id’ in ‘field list’

我数据库中的字段和Student中的属性名,一致,但还是出现出错误,所以,可以手动加一个@TableField("gradeId") gradeId为数据库中字段名
springBoot整合mybatis_plus时候,出现Unknown column ‘grade_id‘ in ‘field list‘_第1张图片

org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Unknown column 'grade_id' in 'field list'
### The error may exist in com/itheima/dao/StudentDao.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT  id,name,email,borndate,grade_id,username,password,sex  FROM student
### Cause: java.sql.SQLSyntaxErrorException: Unknown column 'grade_id' in 'field list'
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'grade_id' in 'field list'

你可能感兴趣的:(springboot,mysql,mysql)