Best practices for accessing application configuration
posted 4 years ago
What are the current best practices for loading and accessing configuration values on application level. My understanding is that Singletons should not be used. I have read something about thread local, but I was wondering what else is in use and has proven to work well. Spring comes to mind as well, but as the application I am working on is rather small I would prefer not to add too many libraries.
What I mean with application level configuration is stuff like database drivers, colors, input/output paths for files, etc. So basically configuration values that you would like to access from all over the application and that you do not want to pass around from class to class.