tomcat调用数据库时java.lang.ClassNotFoundException: com.mysql.jdbc.Driver解决方法

使用IDEA调用数据库出现错误的原因:tomcat找不到JDBC的驱动类 1、普通java项目只需要把jar添加到工程即可 2、web项目应该把jar包放在tomcat的lib库下面 下面分别对该两种项目导包方式介绍 普通项目导包方法 1、第一种方式 File –> Project Structure –>modules –>点击右侧的+号 –>JARs or directories –>选择所需
相关文章
相关标签/搜索