Skip to content

Commit 0bf93a7

Browse files
APIS-6764: play 3.0 upgrade (#85)
* APIS-6764: play 3.0 upgrade * APIS-6764:PR Bot Comments * APIS-6764:More PR Bot Comments
1 parent c47b795 commit 0bf93a7

File tree

7 files changed

+13
-54
lines changed

7 files changed

+13
-54
lines changed

conf/app.routes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ POST /scope uk.gov.hmrc.apiscope.controllers.ScopeController.
44
GET /scope uk.gov.hmrc.apiscope.controllers.ScopeController.fetchScopes(keys ?= "*")
55
GET /scope/:key uk.gov.hmrc.apiscope.controllers.ScopeController.fetchScope(key)
66

7-
POST /scope/validate uk.gov.hmrc.apiscope.controllers.ScopeController.validate()
7+
POST /scope/validate uk.gov.hmrc.apiscope.controllers.ScopeController.validate()

conf/application.conf

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,8 @@ appUrl="http://localhost:9690"
2020

2121
include "backend.conf"
2222

23-
# An ApplicationLoader that uses Guice to bootstrap the application.
24-
play.application.loader = "uk.gov.hmrc.play.bootstrap.ApplicationLoader"
25-
26-
# Primary entry point for all HTTP requests on Play applications
27-
play.http.requestHandler = "uk.gov.hmrc.play.bootstrap.http.RequestHandler"
28-
29-
# Provides an implementation of AuditConnector. Use `uk.gov.hmrc.play.audit.AuditModule` or create your own.
30-
# An audit connector must be provided.
31-
play.modules.enabled += "uk.gov.hmrc.play.audit.AuditModule"
32-
33-
# Provides an implementation of MetricsFilter. Use `uk.gov.hmrc.play.bootstrap.graphite.GraphiteMetricsModule` or create your own.
34-
# A metric filter must be provided
35-
play.modules.enabled += "uk.gov.hmrc.play.bootstrap.graphite.GraphiteMetricsModule"
36-
3723
play.modules.enabled += "uk.gov.hmrc.apiscope.module.ScopeJsonFileReaderModule"
3824

39-
# Provides an implementation and configures all filters required by a Platform backend microservice.
40-
play.modules.enabled += "uk.gov.hmrc.play.bootstrap.backend.BackendModule"
41-
4225
# Json error handler
4326
play.http.errorHandler = "uk.gov.hmrc.play.bootstrap.backend.http.JsonErrorHandler"
4427

@@ -91,30 +74,6 @@ controllers {
9174
}
9275
}
9376

94-
metrics {
95-
name = ${appName}
96-
rateUnit = SECONDS
97-
durationUnit = SECONDS
98-
showSamples = true
99-
jvm = true
100-
enabled = true
101-
}
102-
103-
auditing {
104-
enabled = false
105-
}
106-
10777
mongodb {
10878
uri = "mongodb://localhost:27017/api-scope-test"
10979
}
110-
111-
microservice {
112-
metrics {
113-
graphite {
114-
host = graphite
115-
port = 2003
116-
prefix = play.${appName}.
117-
enabled = false
118-
}
119-
}
120-
}

conf/logback.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
</logger>
4545

4646
<logger name="com.google.inject" level="INFO"/>
47+
<logger name="org.apache.pekko" level="ERROR"/>
4748
<logger name="org.asynchttpclient.netty.channel.DefaultChannelPool" level="INFO"/>
4849
<logger name="io.netty" level="INFO"/>
4950

conf/prod.routes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Add all the application routes to the app.routes file
22
-> / app.Routes
33
-> / health.Routes
4-
GET /admin/metrics com.kenshoo.play.metrics.MetricsController.metrics

project/AppDependencies.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ object AppDependencies {
55

66
lazy val libraryDependencies = compile ++ test
77

8-
private lazy val bootstrapVersion = "7.12.0"
8+
private lazy val bootstrapVersion = "8.4.0"
99
private lazy val hmrcMongoVersion = "1.7.0"
1010
private lazy val scalaJVersion = "2.4.2"
1111
val commonDomainVersion = "0.10.0"
1212

1313
private lazy val compile = Seq(
14-
"uk.gov.hmrc" %% "bootstrap-backend-play-28" % bootstrapVersion,
15-
"uk.gov.hmrc.mongo" %% "hmrc-mongo-play-28" % hmrcMongoVersion,
14+
"uk.gov.hmrc" %% "bootstrap-backend-play-30" % bootstrapVersion,
15+
"uk.gov.hmrc.mongo" %% "hmrc-mongo-play-30" % hmrcMongoVersion,
1616
"uk.gov.hmrc" %% "api-platform-common-domain" % commonDomainVersion
1717
)
1818

1919
private lazy val test = Seq(
20-
"uk.gov.hmrc.mongo" %% "hmrc-mongo-test-play-28" % hmrcMongoVersion,
20+
"uk.gov.hmrc.mongo" %% "hmrc-mongo-test-play-30" % hmrcMongoVersion,
2121
"org.scalaj" %% "scalaj-http" % scalaJVersion,
22-
"uk.gov.hmrc" %% "bootstrap-test-play-28" % bootstrapVersion,
22+
"uk.gov.hmrc" %% "bootstrap-test-play-30" % bootstrapVersion,
2323
"org.mockito" %% "mockito-scala-scalatest" % "1.17.29",
2424
"uk.gov.hmrc" %% "api-platform-test-common-domain" % commonDomainVersion
2525
).map(_ % "test, it")

project/plugins.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
resolvers += "HMRC-open-artefacts-maven" at "https://open.artefacts.tax.service.gov.uk/maven2"
22
resolvers += Resolver.url("HMRC-open-artefacts-ivy", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns)
33

4-
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.18.0")
5-
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.4.0")
6-
addSbtPlugin("org.scoverage" %% "sbt-scoverage" % "2.0.9")
4+
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.20.0")
5+
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0")
6+
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.1")
7+
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
78
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
8-
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.20")
9-
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.11")
109
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
10+
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.13")
1111
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
1212

1313
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

test/uk/gov/hmrc/apiscope/controllers/ScopeControllerSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package uk.gov.hmrc.apiscope.controllers
1919
import scala.concurrent.ExecutionContext.Implicits.global
2020
import scala.concurrent.Future.{failed, successful}
2121

22-
import akka.stream.Materializer
22+
import org.apache.pekko.stream.Materializer
2323
import org.scalatest.prop.TableDrivenPropertyChecks._
2424
import org.scalatest.prop.TableFor2
2525
import org.scalatest.prop.Tables.Table

0 commit comments

Comments
 (0)