Spring Config

ID: spring-config

This plugin is used to read Spring Boot style application properties files.


This plugin supports custom location and profiles. The return is a nested Map object.

Suppose there's a yaml style application.yaml config file.

  bar: value1

Read the config file

def config=springConfig()
print config.foo.bar // Nested style
print config.asProperties()['foo.bar'] // All keys are flattened
print config.asPropertiesFileContent()  // It returns standard Java properties file format. All no ascii string are escapted.

Each build has a 'Spring Config' page which shows the configuration read by this plugin.


  • profiles: A list of profiles. See detail at Spring Document.

  • location: The custom location. The plugin reads the configuration files either at current directory (workspace root or dir step) or a config sub directory. If not in these two, a relative path must be specified. This path must end with '/' if it is a directory.

  • hideInBuildPage: Don't show the configurtions in the build 'Spring Config' page.


def config=springConfig(profiles: ['p1','p2'], location : 'custom-config/,custom-config2/')