Reputation: 81
I have global object in the root of app folder. But methods onStart and onStop do not work. What is wrong and how can I fix it ?
import persistence.Persist
import play.api._
object Glabal extends GlobalSettings {
override def onStart(app: Application) {
try {
Persist.createSchema
} catch {
case e: Exception => Logger.info("Schema exists", e)
}
Logger.info("Application has started")
}
override def onStop(app: Application) {
Logger.info("Application shutdown...")
}
}
BR!
Upvotes: 0
Views: 314
Reputation: 1066
it should work exactly, how you did it. But: You do have a "typo": Your object is named "Glabal", instead of "Global".
Upvotes: 1