回答編集履歴
1
application.confの書き方について修正
answer
CHANGED
@@ -1,15 +1,23 @@
|
|
1
|
+
hikaricpの設定などごちゃ混ぜになっていると思われるので
|
2
|
+
一旦、標準的な書き方にして試してみてください。
|
1
|
-
```conf
|
3
|
+
```application.conf
|
2
|
-
db{
|
4
|
+
play.db{
|
5
|
+
#config = "db"
|
6
|
+
#default = "default"
|
7
|
+
|
3
|
-
default.
|
8
|
+
# Play uses HikariCP as the default connection pool. You can override
|
9
|
+
# settings by changing the prototype:
|
10
|
+
prototype {
|
11
|
+
# Sets a fixed JDBC connection pool size of 50
|
12
|
+
#hikaricp.minimumIdle = 50
|
13
|
+
#hikaricp.maximumPoolSize = 50
|
14
|
+
}
|
4
15
|
}
|
5
|
-
```
|
6
|
-
と書かれていますが、
|
7
|
-
[Playのリファレンス](https://www.playframework.com/documentation/2.5.10/JavaDatabase)では、
|
8
|
-
|
9
|
-
```conf
|
10
16
|
db{
|
17
|
+
default.driver=com.mysql.jdbc.Driver
|
11
18
|
default.url="jdbc:mysql://localhost/sample_db"
|
19
|
+
default.username=root
|
20
|
+
default.password="nfgwe4706"
|
12
21
|
}
|
22
|
+
ebean.default=["models.*"]
|
13
|
-
```
|
23
|
+
```
|
14
|
-
と書かれています。
|
15
|
-
指定が間違っているとDB接続はできません。
|