Is it possible to get a constant form of java properties file? I am trying to develop my application to set a flag in the basic properties file, which determines whether the application uses a development or production configuration file.
Most applications work fine, but Ive hit a bit of a brick wall with the database table displayed in entity classes. I am using DB Dynamo, so the class itself requires annotations as follows:
@DynamoDBTable(tableName = "table_name")
public class EmailTemplates {
...
The value of tableName should be constant, and I am trying to use the following to extract the value from the properties file and pass it to the table name;
@DynamoDBTable(tableName = DynamoTable.TABLE_NAME)
public class EmailTemplates {
...
DynamoTable Class:
public final class DynamoTable {
public static final String TABLE_NAME = ResourceBundle.getBundle(ResourceBundle.getBundle("ProjectStage").getString("ProjectStage")).getString("EmailTemplates");
}
, , . (.. "AStringValue" ), , .
NB. , , . , .