Browse Source

Upgrade to Play Framework version 2.7.0 (#4409)

* Base docker image with updated Scala and sbt

* Play 2.7.0

* New play-ebean release

* Upgrade Scala and sbt

* Fix needed for Play 2.7

* Use latest Hibernate

* Include (only) persistence.xml in application jar

* Template fix for Play 2.7

* Upgrade Play-reactivemongo

* play2-reactivemongo still needs global application

* Keep using Play 2.6 for play2-scala-reactivemongo for now

* Rollback more play2-reactivemongo Play 2.7 stuff
Matthias Kurz 6 years ago
parent
commit
9b08f2a990
56 changed files with 78 additions and 85 deletions
  1. 1 1
      frameworks/Java/play2-java/play2-java-ebean-hikaricp-netty.dockerfile
  2. 1 1
      frameworks/Java/play2-java/play2-java-ebean-hikaricp.dockerfile
  3. 1 1
      frameworks/Java/play2-java/play2-java-ebean-hikaricp/README.md
  4. 1 1
      frameworks/Java/play2-java/play2-java-ebean-hikaricp/build.sbt
  5. 1 1
      frameworks/Java/play2-java/play2-java-ebean-hikaricp/conf/application.conf
  6. 1 1
      frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/build.properties
  7. 2 2
      frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/plugins.sbt
  8. 1 1
      frameworks/Java/play2-java/play2-java-jooq-hikaricp-netty.dockerfile
  9. 1 1
      frameworks/Java/play2-java/play2-java-jooq-hikaricp.dockerfile
  10. 1 1
      frameworks/Java/play2-java/play2-java-jooq-hikaricp/README.md
  11. 1 1
      frameworks/Java/play2-java/play2-java-jooq-hikaricp/build.sbt
  12. 1 1
      frameworks/Java/play2-java/play2-java-jooq-hikaricp/conf/application.conf
  13. 1 1
      frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/build.properties
  14. 1 1
      frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/plugins.sbt
  15. 1 1
      frameworks/Java/play2-java/play2-java-jpa-hikaricp-netty.dockerfile
  16. 1 1
      frameworks/Java/play2-java/play2-java-jpa-hikaricp.dockerfile
  17. 1 1
      frameworks/Java/play2-java/play2-java-jpa-hikaricp/README.md
  18. 1 1
      frameworks/Java/play2-java/play2-java-jpa-hikaricp/app/models/World.java
  19. 3 3
      frameworks/Java/play2-java/play2-java-jpa-hikaricp/build.sbt
  20. 1 1
      frameworks/Java/play2-java/play2-java-jpa-hikaricp/conf/application.conf
  21. 1 1
      frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/build.properties
  22. 1 1
      frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/plugins.sbt
  23. 1 1
      frameworks/Java/play2-java/play2-java-netty.dockerfile
  24. 1 1
      frameworks/Java/play2-java/play2-java.dockerfile
  25. 1 1
      frameworks/Java/play2-java/play2-java/README.md
  26. 1 1
      frameworks/Java/play2-java/play2-java/build.sbt
  27. 1 1
      frameworks/Java/play2-java/play2-java/conf/application.conf
  28. 1 1
      frameworks/Java/play2-java/play2-java/project/build.properties
  29. 1 1
      frameworks/Java/play2-java/play2-java/project/plugins.sbt
  30. 1 1
      frameworks/Scala/play2-scala/play2-scala-anorm-netty.dockerfile
  31. 1 1
      frameworks/Scala/play2-scala/play2-scala-anorm.dockerfile
  32. 2 2
      frameworks/Scala/play2-scala/play2-scala-anorm/app/views/fortune.scala.html
  33. 1 1
      frameworks/Scala/play2-scala/play2-scala-anorm/build.sbt
  34. 1 1
      frameworks/Scala/play2-scala/play2-scala-anorm/conf/application.conf
  35. 1 1
      frameworks/Scala/play2-scala/play2-scala-anorm/project/build.properties
  36. 1 1
      frameworks/Scala/play2-scala/play2-scala-anorm/project/plugins.sbt
  37. 1 1
      frameworks/Scala/play2-scala/play2-scala-netty.dockerfile
  38. 1 1
      frameworks/Scala/play2-scala/play2-scala-reactivemongo-netty.dockerfile
  39. 1 1
      frameworks/Scala/play2-scala/play2-scala-reactivemongo.dockerfile
  40. 16 23
      frameworks/Scala/play2-scala/play2-scala-reactivemongo/app/controllers/Application.scala
  41. 3 3
      frameworks/Scala/play2-scala/play2-scala-reactivemongo/build.sbt
  42. 1 1
      frameworks/Scala/play2-scala/play2-scala-reactivemongo/conf/application.conf
  43. 1 1
      frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/build.properties
  44. 1 1
      frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/plugins.sbt
  45. 1 1
      frameworks/Scala/play2-scala/play2-scala-slick-netty.dockerfile
  46. 1 1
      frameworks/Scala/play2-scala/play2-scala-slick.dockerfile
  47. 2 2
      frameworks/Scala/play2-scala/play2-scala-slick/app/views/fortune.scala.html
  48. 1 1
      frameworks/Scala/play2-scala/play2-scala-slick/build.sbt
  49. 1 1
      frameworks/Scala/play2-scala/play2-scala-slick/conf/application.conf
  50. 1 1
      frameworks/Scala/play2-scala/play2-scala-slick/project/build.properties
  51. 1 1
      frameworks/Scala/play2-scala/play2-scala-slick/project/plugins.sbt
  52. 1 1
      frameworks/Scala/play2-scala/play2-scala.dockerfile
  53. 1 1
      frameworks/Scala/play2-scala/play2-scala/build.sbt
  54. 1 1
      frameworks/Scala/play2-scala/play2-scala/conf/application.conf
  55. 1 1
      frameworks/Scala/play2-scala/play2-scala/project/build.properties
  56. 1 1
      frameworks/Scala/play2-scala/play2-scala/project/plugins.sbt

+ 1 - 1
frameworks/Java/play2-java/play2-java-ebean-hikaricp-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java-ebean-hikaricp .
 COPY play2-java-ebean-hikaricp .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java-ebean-hikaricp.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java-ebean-hikaricp .
 COPY play2-java-ebean-hikaricp .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java-ebean-hikaricp/README.md

@@ -12,7 +12,7 @@ This is the Play portion of a [benchmarking test suite](../) comparing a variety
 The tests were run with:
 The tests were run with:
 
 
 * Java 8
 * Java 8
-* [Play 2.6.7](https://www.playframework.com/)
+* [Play 2.7.0](https://www.playframework.com/)
 
 
 ## Test URLs
 ## Test URLs
 ### Data-Store/Database Mapping Test
 ### Data-Store/Database Mapping Test

+ 1 - 1
frameworks/Java/play2-java/play2-java-ebean-hikaricp/build.sbt

@@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayEbean, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 libraryDependencies ++= Seq(
 libraryDependencies ++= Seq(
   guice,
   guice,

+ 1 - 1
frameworks/Java/play2-java/play2-java-ebean-hikaricp/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 2 - 2
frameworks/Java/play2-java/play2-java-ebean-hikaricp/project/plugins.sbt

@@ -1,3 +1,3 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")
 
 
-addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "4.1.3")
+addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "5.0.1")

+ 1 - 1
frameworks/Java/play2-java/play2-java-jooq-hikaricp-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java-jooq-hikaricp .
 COPY play2-java-jooq-hikaricp .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java-jooq-hikaricp.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java-jooq-hikaricp .
 COPY play2-java-jooq-hikaricp .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java-jooq-hikaricp/README.md

@@ -12,7 +12,7 @@ This is the Play portion of a [benchmarking test suite](../) comparing a variety
 The tests were run with:
 The tests were run with:
 
 
 * Java 8
 * Java 8
-* [Play 2.6.7](https://www.playframework.com/)
+* [Play 2.7.0](https://www.playframework.com/)
 
 
 ## Test URLs
 ## Test URLs
 ### Data-Store/Database Mapping Test
 ### Data-Store/Database Mapping Test

+ 1 - 1
frameworks/Java/play2-java/play2-java-jooq-hikaricp/build.sbt

@@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 val jOOQVersion = "3.10.3"
 val jOOQVersion = "3.10.3"
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java-jooq-hikaricp/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 1 - 1
frameworks/Java/play2-java/play2-java-jooq-hikaricp/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")

+ 1 - 1
frameworks/Java/play2-java/play2-java-jpa-hikaricp-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java-jpa-hikaricp .
 COPY play2-java-jpa-hikaricp .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java-jpa-hikaricp.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java-jpa-hikaricp .
 COPY play2-java-jpa-hikaricp .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java-jpa-hikaricp/README.md

@@ -12,7 +12,7 @@ This is the Play portion of a [benchmarking test suite](../) comparing a variety
 The tests were run with:
 The tests were run with:
 
 
 * Java 8
 * Java 8
-* [Play 2.6.15](https://www.playframework.com/)
+* [Play 2.7.0](https://www.playframework.com/)
 
 
 ## Test URLs
 ## Test URLs
 ### Data-Store/Database Mapping Test
 ### Data-Store/Database Mapping Test

+ 1 - 1
frameworks/Java/play2-java/play2-java-jpa-hikaricp/app/models/World.java

@@ -20,7 +20,7 @@ public class World {
     public Long randomNumber;
     public Long randomNumber;
 
 
     public static World findById(final Long id, final JPAApi jpa) {
     public static World findById(final Long id, final JPAApi jpa) {
-        return jpa.withTransaction("default", true, em -> em.find(World.class, id));
+        return jpa.withTransaction("default", true, em -> { return em.find(World.class, id); });
     }
     }
 
 
     public static List<World> save(final List<World> worlds, final JPAApi jpa) {
     public static List<World> save(final List<World> worlds, final JPAApi jpa) {

+ 3 - 3
frameworks/Java/play2-java/play2-java-jpa-hikaricp/build.sbt

@@ -4,13 +4,13 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 libraryDependencies ++= Seq(
 libraryDependencies ++= Seq(
   guice,
   guice,
   javaJpa,
   javaJpa,
   "mysql" % "mysql-connector-java" % "5.1.47",
   "mysql" % "mysql-connector-java" % "5.1.47",
-  "org.hibernate" % "hibernate-core" % "5.2.12.Final"
+  "org.hibernate" % "hibernate-core" % "5.4.1.Final"
 )
 )
 
 
-PlayKeys.externalizeResources := false
+PlayKeys.externalizeResourcesExcludes += baseDirectory.value / "conf" / "META-INF" / "persistence.xml"

+ 1 - 1
frameworks/Java/play2-java/play2-java-jpa-hikaricp/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 1 - 1
frameworks/Java/play2-java/play2-java-jpa-hikaricp/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")

+ 1 - 1
frameworks/Java/play2-java/play2-java-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java .
 COPY play2-java .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-java .
 COPY play2-java .
 
 

+ 1 - 1
frameworks/Java/play2-java/play2-java/README.md

@@ -10,7 +10,7 @@ This is the Play portion of a [benchmarking test suite](../) comparing a variety
 The tests were run with:
 The tests were run with:
 
 
 * Java 8
 * Java 8
-* [Play 2.6.15](https://www.playframework.com/)
+* [Play 2.7.0](https://www.playframework.com/)
 
 
 ## Test URLs
 ## Test URLs
 ### JSON Encoding Test
 ### JSON Encoding Test

+ 1 - 1
frameworks/Java/play2-java/play2-java/build.sbt

@@ -4,6 +4,6 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayJava, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 libraryDependencies += guice
 libraryDependencies += guice

+ 1 - 1
frameworks/Java/play2-java/play2-java/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Java/play2-java/play2-java/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 1 - 1
frameworks/Java/play2-java/play2-java/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-anorm-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala-anorm .
 COPY play2-scala-anorm .
 
 

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-anorm.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala-anorm .
 COPY play2-scala-anorm .
 
 

+ 2 - 2
frameworks/Scala/play2-scala/play2-scala-anorm/app/views/fortune.scala.html

@@ -7,12 +7,12 @@
             <th>message</th>
             <th>message</th>
         </tr>
         </tr>
 
 
-        @fortunes.sortBy(_.message).map { case Fortune(id, message) =>
+        @fortunes.sortBy(_.message).map { case Fortune(id, message) => {
             <tr>
             <tr>
                 <td>@id</td>
                 <td>@id</td>
                 <td>@message</td>
                 <td>@message</td>
             </tr>
             </tr>
-        }
+        }}
 
 
     </table>
     </table>
 }
 }

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-anorm/build.sbt

@@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 libraryDependencies ++= Seq(
 libraryDependencies ++= Seq(
   guice,
   guice,

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-anorm/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-anorm/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-anorm/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala .
 COPY play2-scala .
 
 

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-reactivemongo-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala-reactivemongo .
 COPY play2-scala-reactivemongo .
 
 

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-reactivemongo.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala-reactivemongo .
 COPY play2-scala-reactivemongo .
 
 

+ 16 - 23
frameworks/Scala/play2-scala/play2-scala-reactivemongo/app/controllers/Application.scala

@@ -1,48 +1,41 @@
 package controllers
 package controllers
 
 
 import java.util.concurrent.ThreadLocalRandom
 import java.util.concurrent.ThreadLocalRandom
-import scala.concurrent.{Future, ExecutionContext}
 
 
-import play.api.libs.json.{JsObject, Json, JsValue}
+import scala.concurrent.{ExecutionContext, Future}
+import play.api.libs.json.{JsObject, JsValue, Json}
 import play.api.mvc._
 import play.api.mvc._
-import play.mvc.Http
-
-import reactivemongo.api.ReadPreference
+import reactivemongo.api.{Cursor, ReadPreference}
 import reactivemongo.play.json.collection.JSONCollection
 import reactivemongo.play.json.collection.JSONCollection
-import play.modules.reactivemongo.{
-  ReactiveMongoApi, ReactiveMongoComponents, MongoController
-}
-import play.modules.reactivemongo.json._
+import play.modules.reactivemongo.ReactiveMongoApi
+import reactivemongo.play.json._
 
 
 class Application (val controllerComponents: ControllerComponents, reactiveMongoApi: ReactiveMongoApi)(implicit ec: ExecutionContext)
 class Application (val controllerComponents: ControllerComponents, reactiveMongoApi: ReactiveMongoApi)(implicit ec: ExecutionContext)
   extends BaseController {
   extends BaseController {
 
 
-  private def worldCollection: JSONCollection = reactiveMongoApi.db.collection[JSONCollection]("world")
-  private def fortuneCollection: JSONCollection = reactiveMongoApi.db.collection[JSONCollection]("fortune")
+  private def worldCollection: Future[JSONCollection] = reactiveMongoApi.database.map(_.collection[JSONCollection]("world"))
+  private def fortuneCollection: Future[JSONCollection] = reactiveMongoApi.database.map(_.collection[JSONCollection]("fortune"))
   private val projection = Json.obj("_id" -> 0)
   private val projection = Json.obj("_id" -> 0)
 
 
   def getRandomWorlds(queries: Int): Future[Seq[Option[JsObject]]] = {
   def getRandomWorlds(queries: Int): Future[Seq[Option[JsObject]]] = {
     val futureWorlds: Seq[Future[Option[JsObject]]] = for {
     val futureWorlds: Seq[Future[Option[JsObject]]] = for {
       _ <- 1 to queries
       _ <- 1 to queries
-    } yield { worldCollection
-      .find(Json.obj("_id" -> getNextRandom), projection)
-      .one[JsObject]
+    } yield { worldCollection.map(_
+      .find(Json.obj("_id" -> getNextRandom), Option(projection))
+      .one[JsObject]).flatten
     }
     }
     Future.sequence(futureWorlds)
     Future.sequence(futureWorlds)
   }
   }
 
 
   def getRandomWorld = {
   def getRandomWorld = {
-    val futureWorld = worldCollection
-      .find(Json.obj("id" -> getNextRandom), projection)
-      .one[JsValue]
-    futureWorld
+    worldCollection.map(_
+      .find(Json.obj("id" -> getNextRandom), Option(projection))
+      .one[JsValue]).flatten
   }
   }
 
 
   def getFortunes: Future[List[JsObject]] = {
   def getFortunes: Future[List[JsObject]] = {
-    val futureFortunes: Future[List[JsObject]] =
-      fortuneCollection.find(Json.obj())
-        .cursor[JsObject](ReadPreference.primaryPreferred, false).collect[List]()
-    futureFortunes
+      fortuneCollection.map(_.find(Json.obj(), Option.empty[JsObject])
+        .cursor[JsObject](ReadPreference.primaryPreferred, false).collect[List](Int.MaxValue, (v, t) => Cursor.Fail(t))).flatten
   }
   }
 
 
   def updateWorlds(queries: Int): Future[Seq[JsObject]] = {
   def updateWorlds(queries: Int): Future[Seq[JsObject]] = {
@@ -50,7 +43,7 @@ class Application (val controllerComponents: ControllerComponents, reactiveMongo
       .map(_.flatten)
       .map(_.flatten)
       .map(_.map(oldWorld => {
       .map(_.map(oldWorld => {
         val newWorld = oldWorld ++ Json.obj("randomNumber" -> getNextRandom)
         val newWorld = oldWorld ++ Json.obj("randomNumber" -> getNextRandom)
-        worldCollection.update(oldWorld, newWorld).map(result => newWorld)
+        worldCollection.map(_.update(oldWorld, newWorld).map(result => newWorld)).flatten
       }))
       }))
       .map(Future.sequence(_))
       .map(Future.sequence(_))
       .flatten
       .flatten

+ 3 - 3
frameworks/Scala/play2-scala/play2-scala-reactivemongo/build.sbt

@@ -4,11 +4,11 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 libraryDependencies ++= Seq(
 libraryDependencies ++= Seq(
-  "org.reactivemongo" %% "play2-reactivemongo" % "0.12.7-play26",
-  "org.reactivemongo" %% "reactivemongo-play-json" % "0.12.7-play26",
+  "org.reactivemongo" %% "play2-reactivemongo" % "0.16.0-play26",
+  "org.reactivemongo" %% "reactivemongo-play-json" % "0.16.0-play26",
   "com.softwaremill.macwire" %% "macros" % "2.3.0",
   "com.softwaremill.macwire" %% "macros" % "2.3.0",
   "com.softwaremill.macwire" %% "util" % "2.3.0"
   "com.softwaremill.macwire" %% "util" % "2.3.0"
 )
 )

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-reactivemongo/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-reactivemongo/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.21")

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-slick-netty.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala-slick .
 COPY play2-scala-slick .
 
 

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-slick.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala-slick .
 COPY play2-scala-slick .
 
 

+ 2 - 2
frameworks/Scala/play2-scala/play2-scala-slick/app/views/fortune.scala.html

@@ -7,12 +7,12 @@
             <th>message</th>
             <th>message</th>
         </tr>
         </tr>
 
 
-        @fortunes.sortBy(_.message).map { case Fortune(id, message) =>
+        @fortunes.sortBy(_.message).map { case Fortune(id, message) => {
             <tr>
             <tr>
                 <td>@id</td>
                 <td>@id</td>
                 <td>@message</td>
                 <td>@message</td>
             </tr>
             </tr>
-        }
+        }}
 
 
     </table>
     </table>
 }
 }

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-slick/build.sbt

@@ -4,7 +4,7 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 libraryDependencies ++= Seq(
 libraryDependencies ++= Seq(
   guice,
   guice,

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-slick/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-slick/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala-slick/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala.dockerfile

@@ -1,4 +1,4 @@
-FROM hseeberger/scala-sbt:8u181_2.12.7_1.2.3
+FROM hseeberger/scala-sbt:8u181_2.12.8_1.2.8
 WORKDIR /play2
 WORKDIR /play2
 COPY play2-scala .
 COPY play2-scala .
 
 

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala/build.sbt

@@ -4,6 +4,6 @@ version := "1.0-SNAPSHOT"
 
 
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 lazy val root = (project in file(".")).enablePlugins(PlayScala, PlayNettyServer)
 
 
-scalaVersion := "2.12.7"
+scalaVersion := "2.12.8"
 
 
 libraryDependencies += guice
 libraryDependencies += guice

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala/conf/application.conf

@@ -47,7 +47,7 @@ akka {
         # https://www.techempower.com/benchmarks/#section=environment
         # https://www.techempower.com/benchmarks/#section=environment
         parallelism-max = 40
         parallelism-max = 40
 
 
-        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.6.x/Migration24#Thread-pool-configuration
+        task-peeking-mode="LIFO" # based on https://www.playframework.com/documentation/2.7.x/Migration24#Thread-pool-configuration
       }
       }
 
 
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher
       # https://doc.akka.io/docs/akka/2.5.11/dispatchers.html#looking-up-a-dispatcher

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala/project/build.properties

@@ -1 +1 @@
-sbt.version=1.2.3
+sbt.version=1.2.8

+ 1 - 1
frameworks/Scala/play2-scala/play2-scala/project/plugins.sbt

@@ -1 +1 @@
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.6.20")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")