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

feat: allow Spanner and Datastore Transaction Manager in same project #1412

Merged
merged 7 commits into from
May 20, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.PlatformTransactionManager;

/**
* Auto-configuration for {@link DatastoreTransactionManager}.
Expand Down Expand Up @@ -55,7 +54,7 @@ static class DatastoreTransactionManagerConfiguration {
}

@Bean
@ConditionalOnMissingBean(PlatformTransactionManager.class)
@ConditionalOnMissingBean
public DatastoreTransactionManager datastoreTransactionManager() {
DatastoreTransactionManager transactionManager =
new DatastoreTransactionManager(this.datastore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.PlatformTransactionManager;

/**
* Auto-configuration for {@link SpannerTransactionManager}.
Expand Down Expand Up @@ -57,7 +56,7 @@ static class DatabaseClientTransactionManagerConfiguration {
}

@Bean
@ConditionalOnMissingBean(PlatformTransactionManager.class)
@ConditionalOnMissingBean
public SpannerTransactionManager spannerTransactionManager() {
SpannerTransactionManager transactionManager =
new SpannerTransactionManager(this.databaseClientProvider);
Expand Down