Could not load JDBC driver class [com.mysql.jdbc.Driver] Could not load JDBC driver class [com.mysql.jdbc.Driver] spring spring

Could not load JDBC driver class [com.mysql.jdbc.Driver]


You probably skipped some dependencies:

<dependency>    <groupId>mysql</groupId>    <artifactId>mysql-connector-java</artifactId>    <version>5.1.6</version></dependency>


I had the same issue. I followed these steps in IntelliJ editor.

Steps

  1. Click File and click on the "Project Structure" menu item.
  2. Click "Artifacts" from the left navigation bar.
  3. Select all libraries from the "Available Elements" list.
  4. Right click and click "Put into WEB-INF/lib button.
  5. Click Apply and OK buttons.
  6. Redeploy the Project.

Copied from How to solve Spring ClassNotFoundException in IntelliJ (Java)? video.


Resolved the issue after degrading version of JDBC SQL connector from 5.1.6 to 5.1.31.