下记报错是因为什么啊?未知数据库?我用的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回答

大周

2018-07-23

 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'course' ### The error may exist in file    这句是关键。 你检查一下你的数据库,是不是有一点问题。 course是库还是表

0
1
慕数据3795919
一语中的
2018-07-23
共1条回复

Java接口自动化测试实战,搞定理论基础+典型应用场景

打破传统测试用例设计方法,搞懂基于TestNG的接口自动化测试技术

2086 学习 · 920 问题

查看课程