5.2.1. Configuration Directory
The configuration directory can contain resources that complement and override configuration, user interface, and business logic after the application is deployed. Overriding is provided by the loading mechanism of the Resources infrastructure interface. Firstly it performs the search in the configuration directory and then in the classpath, so that resources from the configuration directory take precedence over identically named resources located in JAR files and class directories.
The configuration directory may contain resources of the following types:
metadata.xml, persistence.xml, views.xml, remoting-spring.xml configuration files.
XML-descriptors of UI screens.
Controllers of UI screens in the form of Java or Groovy source code.
Groovy scripts or classes, and Java source code that is used by the application via the Scripting interface.
The location of the configuration directory is determined by the cuba.confDir application property. In case of fast deployment in Tomcat, it is a subdirectory with the web application name in the
tomcat/conf directory, for example,
tomcat/conf/app-core for the Middleware. For other deployment scenarios, the configuration directory is located inside the application home.