Include other configuration files with #include
masterUse #include to split large configuration files into smaller, manageable pieces.
By default, #include resolves files relative to the file they are being included from. This behavior may not work inside JARs. To ensure reliability in all environments, provide a custom resolver (like resource-resolver) or a map-based resolver to read-config.
;; config.edn
{:webserver #include "webserver.edn"
:analytics #include "analytics.edn"}
;; Using a resolver for JAR compatibility
(require '[aero.core :refer (read-config resource-resolver)])
(read-config "config.edn" {:resolver resource-resolver})
;; Using a map as a resolver
(read-config "config.edn" {:resolver {"webserver.edn" "resources/webserver/config.edn"}})