Class GuiceApplicationLoader

java.lang.Object
play.inject.guice.GuiceApplicationLoader
All Implemented Interfaces:
ApplicationLoader

public class GuiceApplicationLoader extends Object implements ApplicationLoader
An ApplicationLoader that uses Guice to bootstrap the application.

Subclasses can override the builder and overrides methods.

  • Field Details

    • initialBuilder

      protected final GuiceApplicationBuilder initialBuilder
      The initial builder to start construction from.
  • Constructor Details

    • GuiceApplicationLoader

      public GuiceApplicationLoader()
    • GuiceApplicationLoader

      public GuiceApplicationLoader(GuiceApplicationBuilder initialBuilder)
  • Method Details

    • load

      public final Application load(ApplicationLoader.Context context)
      Description copied from interface: ApplicationLoader
      Load an application given the context.
      Specified by:
      load in interface ApplicationLoader
      Parameters:
      context - the context the apps should be loaded into
      Returns:
      the loaded application
    • builder

      Construct a builder to use for loading the given context.
      Parameters:
      context - the context the returned builder will load
      Returns:
      the builder
    • overrides

      protected play.api.inject.guice.GuiceableModule[] overrides(ApplicationLoader.Context context)
      Identify some bindings that should be used as overrides when loading an application using this context. The default implementation of this method provides bindings that most applications should include.
      Parameters:
      context - the context that should be searched for overrides
      Returns:
      the bindings that should be used to override