在配置数据库连接池的时候,会易出错
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: No suitable driver
需要注意的几点:
1、db.properties文件是否书写正确
如下面的 Drivers多了个"s";
jdbc.driver=com.mysql.jdbc.Drivers jdbc.url=jdbc:mysql:///book_db jdbc.username=root jdbc.password=6112783king
2、db.properties文件不能有多余的"空格"
不能在语句的后面添加空格,这样会导致不能解析