Play FramworkからSQLiteを使いたいのですが、データベースファイルをFrameworkから見つけられません。
Application.confの設定が悪いのか、データベースファイルの置き場所が悪いのかわかりません。
初歩的な質問ですが、ご回答いただければ幸いです。
宜しくお願いします。
#環境
sat
1build.sbt 2 3name := """blogdog""" 4version := "1.0-SNAPSHOT" 5 6lazy val root = (project in file(".")).enablePlugins(PlayScala) 7 8scalaVersion := "2.11.6" 9 10libraryDependencies ++= Seq( 11 jdbc, 12 cache, 13 "joda-time" % "joda-time" % "2.3", 14 "org.xerial" % "sqlite-jdbc" % "3.8.6" 15 ,"com.typesafe.play" %% "play-slick" % "1.1.0" 16) 17 18libraryDependencies += evolutions 19 20resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases" 21resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" 22 23// Play provides two styles of routers, one expects its actions to be injected, the 24// other, legacy style, accesses its actions statically. 25routesGenerator := InjectedRoutesGenerator
Application.conf db.default.driver=org.sqlite.JDBC db.default.url="jdbc:sqlite:/resources/lite.db" db.default.user=sa db.default.password=""
データベースファイルのパス . └── resources └── lite.db
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/02/23 13:57