You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While answering a question on stackoverflow where a user tries to use the Spring Boot Auto Configured datasource with Oracle AQJMS it initially didn't work. This was due to an Oracle auto configuration class creating the datasource and happily ignore all the other properties being set.
Excluding the auto-configuration initially appeared to be working in my small solution, it did not however work for the topic starter. Upon further inspection the Spring Boot DataSourceAutoConfiguration only works when spring-jdbc is on the classpath. This is due to the @ConditionalOnClass({ DataSource.class, EmbeddedDatabaseType.class }) on said class.
Just wondering if that was intentional (it appears to as that has been the case since day 1 I think) or should be revised. Auto datasource configuration without spring-jdbc can be useful if you want to use messaging features like Oracle AQJMS or Postgres listeners but require no other JDBC data access.
The text was updated successfully, but these errors were encountered:
wilkinsona
changed the title
DataSourceAutoConfiguration only works with spring-jdbc on the classpath.
Support auto-configuration of a DataSource with spring-jdbc on the classpath
Jan 13, 2025
wilkinsona
changed the title
Support auto-configuration of a DataSource with spring-jdbc on the classpath
Support auto-configuration of a DataSource without spring-jdbc on the classpath
Jan 13, 2025
We think this might be possible to do in 3.5, although we need to update our DataSourceBuilder class to make sure it doesn't reference spring-jdbc imports. We think this should be possible since none of those types are in method signatures.
While answering a question on stackoverflow where a user tries to use the Spring Boot Auto Configured datasource with Oracle AQJMS it initially didn't work. This was due to an Oracle auto configuration class creating the datasource and happily ignore all the other properties being set.
Excluding the auto-configuration initially appeared to be working in my small solution, it did not however work for the topic starter. Upon further inspection the Spring Boot
DataSourceAutoConfiguration
only works whenspring-jdbc
is on the classpath. This is due to the@ConditionalOnClass({ DataSource.class, EmbeddedDatabaseType.class })
on said class.Just wondering if that was intentional (it appears to as that has been the case since day 1 I think) or should be revised. Auto datasource configuration without
spring-jdbc
can be useful if you want to use messaging features like Oracle AQJMS or Postgres listeners but require no other JDBC data access.The text was updated successfully, but these errors were encountered: