连接数据库出错
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/
今天在做Java web项目,在进行数据库连接的时候运行后报错如下:
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/db_mydb?characterEncoding=utf8&useSSL=false
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.luojia.sims.utils.DBManager.getConn(DBManager.java:30)
at com.luojia.sims.dao.UserDAO.addUser(UserDAO.java:22)
at org.apache.jsp.user_005fsave_jsp._jspService(user_005fsave_jsp.java:135)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:444)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.Appli