Bitronix with DB2 in spring boot

215 Views Asked by At

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?

1

There are 1 best solutions below

0
On

Try explicitly setting the driver class name in application.properties|yml.

spring.datasource.driver-class-name=com.ibm.db2.jcc.DB2Driver 

Hope that helps:)