-
Add Cloud Spanner JDBC driver and Hibernate dialect
<dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-spanner-hibernate-dialect</artifactId> <version>0.1.0</version> </dependency> <dependency> <groupId>com.google.cloud</groupId> <artifactId>google-cloud-spanner-jdbc</artifactId> <version>1.7.0</version> </dependency>
-
Configure application.properties
quarkus.datasource.url=jdbc:cloudspanner:/projects/YOUR_PROJECT_ID/instances/demo/databases/demo quarkus.datasource.driver=com.google.cloud.spanner.jdbc.JdbcDriver quarkus.hibernate-orm.dialect=com.google.cloud.spanner.hibernate.SpannerDialect
-
From Plugin:
mvn clean quarkus:dev
-
From JAR:
mvn package java -jar target/...-runner.jar