我无法使用Play Framework 2.1.1连接到数据库

时间:2013-04-22 14:57:18

标签: java scala playframework playframework-2.0

我尝试连接到我的SQL Server数据库,但控制台显示

  

未找到驱动程序:[net.sourceforge.jtds.jdbc.Driver]。

这是我的Application.conf中的代码:

db.default.url="jdbc:jtds:sqlserver://test:2433;DatabaseName=Treinamento"
db.default.driver=net.sourceforge.jtds.jdbc.Driver
db.default.user=user
db.default.password="pwrd"

我将jtds lib添加到项目的Jars文件夹中。

2 个答案:

答案 0 :(得分:0)

您必须将jar文件放在lib文件夹中。

your-project/lib/the-jar-file.jar

这意味着lib文件夹是对app,conf,公共文件夹(以及更多)的嘲弄。

播放应用程序将找到所有罐子。您将不得不重新使用或改进您的项目。

play eclipse
play idea

答案 1 :(得分:0)

在Build.scala中添加依赖项并运行play update

相关问题