Quantcast
Channel: alvinalexander.com - data
Viewing all articles
Browse latest Browse all 25

How to populate sample data when a Play Framework application starts up

$
0
0

If you ever need an example of how to do something when a Play Framework application starts up, check out the Zentasks application in the Play distribution samples directory. You'll find the following code in the Global.scala file in the app subdirectory of the project. It shows how to use the onStart method of the Global object to populate some sample data when the Play Framework app starts up.

Here's the source code for that class:

read more


Viewing all articles
Browse latest Browse all 25

Trending Articles