Sim*_*mon 12 postgresql playframework
我是戏剧的新手!框架和postgresql,我试图让它工作.
我在stackoverflow上阅读了很多问题,我在google上搜索了很多但是我没有设法让它工作.
这是Play的错误!给我 :
Driver not found: [org.postgresql.Driver]
Run Code Online (Sandbox Code Playgroud)
我的问题是:
1)你知道一个简单的教程(即从头开始解释),它展示了如何配置游戏!使postgresql工作?我读了很多东西,但没有找到详细的教程.
2)如果没有,这是我的配置:
我添加了这个application.conf:
db.default.driver=org.postgresql.Driver
db.default.url="jdbc:postgresql://127.0.0.1/postgres"
db.default.user=postgres
db.default.password=root
Run Code Online (Sandbox Code Playgroud)
并在built.sbt:
libraryDependencies ++= Seq(
jdbc,
anorm,
cache,
)
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
Rya*_*yan 22
正如文档所述,您必须将驱动程序添加到依赖项中:
libraryDependencies += "postgresql" % "postgresql" % "9.1-901-1.jdbc4"
Run Code Online (Sandbox Code Playgroud)
为Postgres安装使用适当的驱动程序版本.
http://www.playframework.com/documentation/2.3.x/ScalaDatabase
| 归档时间: |
|
| 查看次数: |
9959 次 |
| 最近记录: |