错误信息:
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Nov 12 05:13:06 CST 2019
There was an unexpected error (type=Internal Server Error, status=500).
### Error updating database. Cause: org.h2.jdbc.JdbcSQLException: Table "USER" not found; SQL statement: insert into user(name,account_id,token,gmt_create,gmt_modified) values(?,?,?,?,?) [42102-196] ### The error may exist in com/nice/mapper/UserMapper.java (best guess) ### The error may involve com.nice.mapper.UserMapper.insert ### The error occurred while executing an update ### SQL: insert into user(name,account_id,token,gmt_create,gmt_modified) values(?,?,?,?,?) ### Cause: org.h2.jdbc.JdbcSQLException: Table "USER" not found; SQL statement: insert into user(name,account_id,token,gmt_create,gmt_modified) values(?,?,?,?,?) [42102-196] ; bad SQL grammar []; nested exception is org.h2.jdbc.JdbcSQLException: Table "USER" not found; SQL statement: insert into user(name,account_id,token,gmt_create,gmt_modified) values(?,?,?,?,?) [42102-196]
解决方案:
修改jdbc的url 为
spring.datasource.url=jdbc:h2:~/nice-community
检查数据库账号密码是否输入错误

在尝试使用SpringBoot应用与H2数据库整合时遇到了JdbcSQLException,错误显示'Table "USER" not found'。这通常是由于数据库表不存在或者SQL语法错误引起的。解决方案可能涉及检查并修改JDBC URL,确保数据表USER的正确映射。
1万+

被折叠的 条评论
为什么被折叠?



