Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For generation, a special utility project was created with the name configuration-generator



Info

In version 0.0.9 added support for generating yaml files




...


Run from CLI 

To generate GlobalConfiguration class you need open a terminal and enter this command:

...

Info

All comands related to generation you can find in this file cmd/app


...


Flow

In resources folder are stored configuration files

Default file is a application.yaml/global.conf

During launching spring application according on all active profile all config/yaml files merge to

...

GlobalConfiguration instance and save as a map to spring property source (it happens in PropertySourcesApplicationContextInitializer)

After that according on property source initialize GlobalConfiguration bean (GlobalConfigurationProvider)

Here is an example how 

Image AddedImage Added


...


Usage example 

After generation, this class with can be reused throughout the project

...