开发者

Grails Sql Server Express

开发者 https://www.devze.com 2023-03-03 06:19 出处:网络
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 infor

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

精彩评论

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