All Downloads are FREE. Search and download functionalities are using the official Maven repository.

skinny.controller.feature.ScaldiFeature.scala Maven / Gradle / Ivy

There is a newer version: 3.0.0-RC1
Show newest version
package skinny.controller.feature

import scaldi._
import skinny.controller.SkinnyControllerBase
import skinny.injection.SkinnyScaldi

/**
 * Scaldi support for SkinnyController.
 */
trait ScaldiFeature extends Injectable with SkinnyScaldi { self: SkinnyControllerBase =>

  /**
   * Overriden Scaldi modules.
   */
  def scaldiModules: Seq[Module] = Nil

  /**
   * Implicit value for scaldi.Injector.
   */
  implicit lazy val skinnyControllerFeatureScaldiInjector: Injector = {
    if (scaldiModules.isEmpty) injectorForEnv()
    else new MutableInjectorAggregation(skinnyModule :: scaldiModules.toList)
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy