Skip to content

java.lang.IllegalStateException: Could not load JDBC driver class [com.mysql.jdbc.Driver] – Spring Boot / Spring Batch error. How to fix?

The reason for this error is you have missed MySQL dependency in your maven / gradle file.

Add this in your build.gradle.

runtimeOnly 'mysql:mysql-connector-java'

In case of maven,

See also  How to create a new user and grant permissions in MySQL?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.