关于jdbc.properties文件中的书写格式问题会造成数据的读写的失败问题
老师,是这样的:
如果我是这样子写的
driver = com.mysql.jdbc.Driver
url = jdbc:mysql://127.0.0.1:3306/secondkill?useUnicode=true&characterEncoding=utf8
username = root
password = root
然后程序就会报错
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
### The error may exist in file [D:\Program\P_IntelliJ_IDEA_Project\secondKil03\target\classes\mapper\SeckillDao.xml]
### The error may involve org.secondKill.dao.SeckillDao.queryById
### The error occurred while executing a query
但是如果我将jdbc.properties的内容修改为:
jdbc.driver = com.mysql.jdbc.Driver
jdbc.url = jdbc:mysql://127.0.0.1:3306/secondkill?useUnicode=true&characterEncoding=utf8
jdbc.username = root
jdbc.password = root
然后在spring-dao中对dataSource的配置作出相同的修改,那么程序就可以正常执行了。
Spring版本4.2.5 Release版本
这个问题的原因我应该从哪一方面去入手解决呢?
谢谢老师