[MySQL/MariaDB] - Loading class com.mysql.jdbc.Driver'. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver'.


Loading class com.mysql.jdbc.Driver’. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’.


이슈


Loading class com.mysql.jdbc.Driver’. This is deprecated. The new driver class iscom.mysql.cj.jdbc.Driver’. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.


해결


spring.datasource.hikari.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.hikari.driver-class-name=com.mysql.cj.jdbc.Driver

아래 설정으로 com.mysql.cj.jdbc.Driver 으로 수정해준다.



[참고]

  • https://stackoverflow.com/questions/52032739/loading-class-com-mysql-jdbc-driver-this-is-deprecated-the-new-driver-class