Last active
August 29, 2015 14:27
-
-
Save Timshel/b39f7ca724b16a7eb01e to your computer and use it in GitHub Desktop.
Workaround for Play #4925
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import play.api._ | |
import play.api.ApplicationLoader.Context | |
/** | |
* Fix for missing DefaultTemporaryFileCreator injection (#4925) | |
* Remove when next play version (2.4.3) is out. | |
*/ | |
abstract class AddTempFileCreatorComponent(context: Context) extends BuiltInComponentsFromContext(context) { | |
import play.api.inject.{ SimpleInjector, NewInstanceInjector, Injector, DefaultApplicationLifecycle } | |
import play.api.libs.Files.DefaultTemporaryFileCreator | |
lazy val defaultTemporaryFileCreator = new DefaultTemporaryFileCreator(applicationLifecycle) | |
override lazy val injector: Injector = new SimpleInjector(NewInstanceInjector) + router + crypto + httpConfiguration + defaultTemporaryFileCreator | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment