我正在尝试将我的数据库从Google Flexible Environment连接到Google Cloud SQL。连接字符串和驱动类如下所示:
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.GoogleDriver" />
    <property name="url" value="jdbc:google:mysql://mz-test:us-central1:mz-life-cloudsql-prod/mz_db" />
    <property name="username" value="root" />
    <property name="password" value="" />
</bean>
但是,我目前正在
org.springframework.beans.factory.BeanCreationException: 
    Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/classes/context/applicationContext-jooq.xml]: 
            Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; 
            nested PropertyAccessExceptions (1) are:|PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception; 
            nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.mysql.jdbc.GoogleDriver]
我尝试连接的数据库是第二代 Cloud SQL MySQL数据库。
为什么我会收到此异常?
App Engine 具有此<use-google-connector-j>属性。我还没有看到灵活环境的这个属性——至少在我目前阅读的那些页面上没有。在我的app.yaml文件中,我需要在 addtion 中设置什么吗?
不确定我是否必须在灵活环境中执行此操作,但我目前正在尝试use-google-connector-j在我的 yaml 文件中将属性设置为 true:
use-google-connector-j: true
但目前看来这不起作用:https ://code.google.com/p/googleappengine/issues/detail?id=11444