开发者

Grails Sql Server Express

I would like some help about setting Grails to work with SQL Server Express. I know I have to change the datasource, but I'm not sure exactly what开发者_Go百科 to do, and couldn't find updated information on the web.


You need to change the datasource settings in grails-app/conf/DataSource.groovy

dataSource {

    // Change the values of these properties to the username, password and hostname
    // for your SQL Server database
    username = "sa"
    password = ""
    url = "jdbc:sqlserver://localhost:1433;databaseName=your_database_name_here"

    driverClassName = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    dialect = "org.hibernate.dialect.SQLServerDialect"
}

You'll need to make sure that the SQL Server JDBC driver is on your classpath either by copying it to the lib directory of the grails application, or configuring it as a runtime dependency in BuildConfig.groovy

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜