My configuration works fine if I define a datasource bean with driver properties containing driverType as 4.
If I let spring boot auto configuration create the data source bean, data source is created with driver type 2 by default as it's hard coded in the driver.
Is creating a bean explicitly the only way?
Try explicitly setting the driver class name in application.properties|yml.
Hope that helps:)