skayred
skayred

Reputation: 10713

Adding some initial code before Play Framework started

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

Answers (1)

Infinity
Infinity

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.

Upvotes: 2

Related Questions