Reputation: 2500
Is there some easy way of retrieving the currently running version of Play framework for an application? I was hoping there is something like Play.getVersion()
which would return "2.3.6" if the application is running version 2.3.6.
The only way I've found so far is the do something like
System.out.println(((HashMap<String, Object>)Play.application().configuration().getObject("java")).get("class"));
which gives me all jars loaded for my application, and I can check if e.g. play_2.11-2.3.6.jar is loaded.
Please tell me there is a better way?
Upvotes: 1
Views: 715
Reputation: 1845
To get play version, you can use
play.core.PlayVersion.current();
Based on https://stackoverflow.com/a/12371679
Upvotes: 3