首页 > 数据库技术 > 详细

搭建SSM项目时报错(org.springframework.jdbc.CannotGetJdbcConnectionException)

时间:2018-05-15 19:00:29      阅读:170      评论:0      收藏:0      [点我收藏+]
严重: Servlet.service() for servlet [SpringMVC] in context with path [/ssm] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class ‘com.mysql.jdbc.Driver  ‘

在搭建SSM项目时报错,一直提示Could not get JDBC Connection;

琢磨了好久才发现是jdbc.properties的文件写错了,如下:

driver=com.mysql.jdbc.Driver  
url=jdbc:mysql://localhost:3306/lin_test  
username=root  
password=123456  

在配置jdbc的时候,末尾不能有空格存在,要删掉所有的多余空格

 

搭建SSM项目时报错(org.springframework.jdbc.CannotGetJdbcConnectionException)

原文:https://www.cnblogs.com/linjinfeng/p/9042274.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!