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

org.webjars.play.WebJarAssets.scala Maven / Gradle / Ivy

There is a newer version: 2.7.3
Show newest version
package org.webjars.play


import javax.inject.Inject

import controllers.AssetsMetadata
import org.webjars.WebJarAssetLocator
import play.api.http.HttpErrorHandler
import play.api.mvc.{Action, AnyContent}

// this is needed to avoid conflicts with the controllers.Assets controller
class WebJarAssets @Inject() (errorHandler: HttpErrorHandler, assetsMetadata: AssetsMetadata) extends controllers.AssetsBuilder(errorHandler, assetsMetadata) {

  override def at(file: String): Action[AnyContent] = {
    at("/" + WebJarAssetLocator.WEBJARS_PATH_PREFIX, file)
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy