org.springframework.dao.InvalidDataAccessResourceUsageException
org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
往上看报错

发现是数据库表中字段名写错了。。。
因为使用了JpaRepository,有一定的映射规则,对于表对应的实体类的成员变量有严格的限制。
例如,数据库列名为student_id、student_name,则Java的Student类的成员变量要命名为studentId和studentName。即把下划线改为驼峰写法。
posted on 2019-09-19 21:37 MasterTumbler 阅读(1333) 评论(0) 收藏 举报
浙公网安备 33010602011771号