BirdsCanada / NatureCountsAPI

NatureCountsAPI
0 stars 1 forks source link

new properties file #9

Open denislepage opened 5 years ago

denislepage commented 5 years ago

I am adding a new Class to track application-wide properties. I will use this to track some of the following: the server application name (e.g. BSC sandbox vs. BSC main), and the bscakn database to connect to (allowing me to temporarily switch to a copy while work is being done). I will be making some changes to support such functionality.

I have also added a property call "app_name" which I am inserting in emails that we receive following errors.

You can get those properties from the static methods in org.bsc.Resources. It is attempting to load the bsc_resources.xml file from the web-inf directory. If the file or the property requested doesn't exist, some of the methods will return a default value, others will simply return null;

I purposely wanted to avoid using the web.xml file, which requires a ServletContext to access.