下记报错是因为什么啊?未知数据库?我用的mysql+navicat。查了百度,用了好多方法都没解决!
来源:11-2 使用mybatis+SpringBoot完成第一个查询demo

慕数据3795919
2018-07-23
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Jul 23 10:31:11 CST 2018
There was an unexpected error (type=Internal Server Error, status=500).
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'course' ### The error may exist in file [D:\git-workspace\muketest\AutoTesting\Chapter11\target\classes\mapper\mysql.xml] ### The error may involve com.course.getUserCount ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'course'
1回答
-
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'course' ### The error may exist in file 这句是关键。 你检查一下你的数据库,是不是有一点问题。 course是库还是表
012018-07-23
相似问题