@Configuration
@ConditionalOnClass(value={javax.sql.DataSource.class,org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType.class,com.google.cloud.sql.CredentialFactory.class})
@ConditionalOnProperty(name="spring.cloud.gcp.sql.enabled",
havingValue="true",
matchIfMissing=true)
@EnableConfigurationProperties(value={GcpCloudSqlProperties.class,org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.class})
@AutoConfigureBefore(value={org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class,org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration.class,org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration.class})
@AutoConfigureAfter(value=GcpContextAutoConfiguration.class)
public class GcpCloudSqlAutoConfiguration
extends Object
Provides Google Cloud SQL instance connectivity through Spring JDBC by providing only a
database and instance connection name.
- Author:
- João André Martins, Artem Bilan, Mike Eltsufin