Grails 3.0.9 ClassNotFoundException:com.mysql.jdbc.Driver

时间:2015-11-28 05:46:07

标签: grails

我的application.yml>

dataSource:
    pooled: true
    jmxExport: true
    driverClassName: com.mysql.jdbc.Driver
    dialect: org.hibernate.dialect.MySQL5InnoDBDialect
    username: root
    password: *****

environments:
    development:
        dataSource:
            #dbCreate: create-drop
            #url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
            dbCreate: update
            driverClassName: com.mysql.jdbc.Driver"
            url: jdbc:mysql://localhost:3306/data?useUnicode=yes&characterEncoding=UTF-8"
            username: "root"
            password: "*****"

build.gradle>

dependencies {
                runtime 'mysql:mysql-connector-java:5.1.36'

例外>

Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver"

即使我尝试从命令提示符运行.. 同样ClassNotFoundException

0 个答案:

没有答案