当我在Google中将我的Spring引导应用程序连接到应用程序引擎中时,我收到了这个错误。

下面我附加了来自application.properties的代码
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://google/myprojectID?cloudSqlInstance=myInstance:us-central1:my-sql-instance&socketFactory=com.google.cloud.sql.mysql.SocketFactory
spring.datasource.username=root
spring.datasource.password=myPasswordpom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter</artifactId>
</dependency>在cloud默认配置中,我曾用于创建数据库。每当我发出这个命令时,我都会收到这个错误。
mvn -DskipTests包应用程序引擎:部署
发布于 2020-01-02 08:57:12
发布于 2019-12-18 08:26:00
我遵循了这个Spring应用程序教程。使用Cloud的Spring宠物诊所
我注意到的一个区别是在pom.xml中:
```<!-- Add CloudSQL Starter for MySQL -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-sql-mysql</artifactId>
</dependency>也是在春云GCP中
SQL - MySQL
Cloud SQL integrations with MySQL
org.springframework.cloud:spring-cloud-gcp-starter-sql-mysql您可以找到更多的信息,弹簧云GCP MySQL样品
编辑:
我能够在App标准上部署(宠物诊所)。在这里你可以找到我的pom.xml
https://stackoverflow.com/questions/59385828
复制相似问题