0
votes

I'm using Play framework for a Scala application and will need to migrate to 2.6.x from 2.5.x

The Global settings class will be removed and I currently rely on it to set the joda DateTimeZone default like so: DateTimeZone.setDefault(DateTimeZone.forID("Europe/London"))

How would I replace this? It says dependency injection on the migration guide, but I thought dependency injection was for getting access to classes/variables, not for executing a method

1

1 Answers

1
votes

You can add:

 class Module extends AbstractModule with ScalaModule {
    override def configure():Unit = {
    // do your default worf here
   }
}

You can use this in place of Global Settings. This is the first thing to get executed bydefault when your application runs.