zoukankan      html  css  js  c++  java
  • 搭建SSM项目时报错(org.springframework.jdbc.CannotGetJdbcConnectionException)

    严重: 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的时候,末尾不能有空格存在,要删掉所有的多余空格

     

  • 相关阅读:
    iOS开发之--打印一堆奇怪东西的解决方案
    iOS开发之--从URL加载图片
    iOS开发之--搭建本地的SVN服务器
    HTML5
    swift
    swift
    HTML 换行
    HTML 注释
    HTML 水平线
    /etc/rc.d/rc.local
  • 原文地址:https://www.cnblogs.com/linjinfeng/p/9042274.html
Copyright © 2011-2022 走看看