Reputation: 10713
I want to perform some configuration options (log4j and ActiveJDBC) in my Play application, but cannot find a way to add custom code on stratup.
Is there any option to do this?
Upvotes: 1
Views: 84
Reputation: 3441
You have to define class extending GlobalSettings in the root package and override one of two methods: beforeStart(body executed before any plugin) or onStart(body executed after all plugins), depends what you exactly need. See Docs and API.
GlobalSettings
beforeStart
onStart
Upvotes: 2