Recipes:Loading_a_Custom_ColdBox_Configuration_File
<< Back to Dashboard | << Recipes Viewer
Load A Custom ColdBox Config File
Introduction
By convention the ConfigurationCFC used in your application is config/ColdBox.cfc. However, you can change the location of this configuration CFC by updating your Application.cfc.
Application.cfc
Open the Application.cfc and look for the following:
<--- COLDBOX PROPERTIES ---> <cfset COLDBOX_CONFIG_FILE = "">
The value is a full instantiation path to the ConfigurationCFC you would like to use:
<--- COLDBOX PROPERTIES ---> <cfset COLDBOX_CONFIG_FILE = "externalMapping.config.ColdBox">
Conclusion
As you can see, it is relatively easy to declare a config file other than the convention standard. This is really useful in multi-tiered environments, unit testing and development environments. Remember that all you need to do is set the COLDBOX_CONFIG_FILE variable before the inclusion of the framework. Enjoy!

SideBar
User Login 




Comments (