This is the Warning im getting in console, Im confused with this warning:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
jdbc. Driver'. This is deprecated. The new driver class is `com.
Deprecation and Removal Notes The TLSv1 and TLSv1. 1 connection protocols are now deprecated.
ClassNotFoundException is a checked exception in Java that occurs when the JVM tries to load a particular class but does not find it in the classpath.
I resolved this problem by change application.properties
of
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
to
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
Hope it help
If you're using Hibernate then change in your "hibernate.cfg.xml" the following:
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
To:
<property name="hibernate.connection.driver_class">com.mysql.cj.jdbc.Driver</property>
That should do :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With