org.h2.jdbc.JdbcSQLSyntaxErrorException: Table “USER” not found; SQL statement: INSERT INTO user
检查了是按照文档内容来的,但是运行出错,后来发现是maven 依赖包版本问题
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.2</version> <relativePath/> <!-- lookup parent from repository --> </parent>
spingboot 版本改为2.6.2,即运行成功。
注意要将依赖包版本与改github官方例子版本一致。