display app version

This commit is contained in:
Athou
2013-07-21 11:40:32 +02:00
parent 9a124db32d
commit 60c64ce900
11 changed files with 82 additions and 25 deletions

View File

@@ -0,0 +1,34 @@
package com.commafeed.backend.services;
import java.util.ResourceBundle;
public class ApplicationPropertiesService {
private ResourceBundle bundle;
private static ApplicationPropertiesService INSTANCE = new ApplicationPropertiesService();
public static ApplicationPropertiesService get() {
return INSTANCE;
}
private ApplicationPropertiesService() {
bundle = ResourceBundle.getBundle("application");
}
public String getDatasource() {
return bundle.getString("datasource");
}
public String getVersion() {
return bundle.getString("version");
}
public String getGitCommit() {
return bundle.getString("git.commit");
}
public boolean isProduction() {
return Boolean.valueOf(bundle.getString("production"));
}
}