Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support auto-configuration of a DataSource without spring-jdbc on the classpath #43786

Open
mdeinum opened this issue Jan 13, 2025 · 0 comments
Labels
for: team-meeting An issue we'd like to discuss as a team to make progress status: waiting-for-triage An issue we've not yet triaged

Comments

@mdeinum
Copy link
Contributor

mdeinum commented Jan 13, 2025

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 13, 2025
@wilkinsona 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 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
@wilkinsona wilkinsona added the for: team-meeting An issue we'd like to discuss as a team to make progress label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: team-meeting An issue we'd like to discuss as a team to make progress status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants