DatabaseFactory

io.ebean.DatabaseFactory has the static factory method that takes a DatabaseConfig and creates a Database instance.

DatabaseConfig config = new DatabaseConfig();

// set configuration options
config.set...
...
// and/or load configuration properties file
config.loadFromProperties();

// create the Database instance
Database database = DatabaseFactory.create(config);

Edit Page