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.
working example:
call like this it will work.
Changed my application.conf file as below. It solved the problem.
Before Change:
After Change:
in my case, I had a line Class.forName("com.mysql.jdbc.Driver"); after removing this line code works fine if you have any line for loading "com.mysql.jdbc.Driver" remove it, it doesn't require any more
In case of using a configuration based on a YML file, the following will be the property that needs to be adjusted inside the given file:
*driverClassName: com.mysql.cj.jdbc.Driver*
According Changes in the Connector/J API "The name of the class that implements java.sql.Driver in MySQL Connector/J has changed from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver. The old class name has been deprecated."
This means that you just need to change the name of the driver:
to
my solution: org.springframework.boot 2.0.5.RELEASE
Rather: org.springframework.boot 2.1.0.RELEASE