- Configuration Sources
- Core Configuration Overview
- MongoDB Configuration Overview
- JPA Configuration Overview
Naryo supports flexible configuration mechanisms. The core module requires manual configuration through custom
implementation due to its framework-agnostic design and wide configuration domain. Configuration can be loaded from
different sources thanks to the implementation of the SourceProvider interface.
Naryo allows you to use multiple configuration sources, which are resolved based on the priority of each source.
Currently, two configuration sources are supported:
-
Core
- The
spring-coremodule allows traditional Spring Boot configuration using YAML or.propertiesfiles, based on theEnvironmentPropertiesmodel.
- The
-
MongoDB
- The
persistence-spring-mongomodule enables dynamic configuration loading from MongoDB, based on each domain's model.
- The
-
JPA
- The
persistence-spring-jpamodule enables dynamic configuration loading from the SQL Database of your choice, based on each domain's model.
- The
In order to manage configurations flexibly, Naryo implements a priority system among configuration sources. Priority is defined as follows:
persistence-spring-mongo(Priority 0): Configuration stored in MongoDB has the highest priority. If a property is defined in both MongoDB andapplication.yml, Naryo will take the value from MongoDB.spring-core(Priority 1): The configuration in theapplication.ymlfile has secondary priority. If a property is not defined in MongoDB, the value will be taken fromapplication.yml.