src/services/config.js
/**
   * Resolve configurations from Spring Cloud Config Server.
   * @param endpoint
   * @param name
   * @param profiles
   * @param label
   * @returns {Promise.<void>}
   */
Resolve configurations from Spring Cloud Config Server.
Resolve configurations from Spring Cloud Config Server .
async resolveSpringConfig({
    endpoint,
    name,
    profiles,
    label = 'master'
  }) {
    if (!config) {
      config = this.loadConfigFromFiles();
    }
    const configRemote = await springConfigClient.load({
      endpoint,
      name,
      profiles: _.isString(profiles) ? profiles.split(',') : [],
      label
    });
    configRemote.forEach((key, value) => {
      _.set(config, key, value);
    });
  }
async resolveSpringConfig ( { endpoint , name , profiles , label = 'master' } ) { if ( ! config ) { config = this . loadConfigFromFiles ( ) ; } const configRemote = await springConfigClient . load ( { endpoint , name , profiles : _ . isString ( profiles ) ? profiles . split ( ',' ) : [ ] , label } ) ; configRemote . forEach ( ( key , value ) => { _ . set ( config , key , value ) ; } ) ; }
Resolve configurations from Spring Cloud Config Server.
Resolve configurations from Spring Cloud Config Server .