Skip to main content

Configuration Description

Henry...Less than 1 minute

Attribute profile description

Plugin Configuration Properties get currently supported 4 ways:extension properties -Ext, Project properties -Prj, System properties -Sys, Environment properties -Env, Sexual priority:Sys > Env > Ext > Prj

Ext(Extension)

Plugin custom extension attributes, attached tobuild.gradlefile configuration, seesamplesopen in new window

Prj(Project)

Project properties, set togradle.propertiesfile, configuration formatextension.property name,, e.g.iHub.mavenLocalEnabled=true; if you want to pass on attributes through the command line, you can use-Pparameters, e.g.-PiHub.mavenLocalEnabled=true

Systems(System)

系统属性,如命令行传递的信息等,配置格式扩展名.属性名,如-DiHub.mavenLocalEnabled=true

Env(Environment)

Environment variable properties, config format for all capitals, multiple words, separated by_eg.MAVEN_LOCAL_ENABLED=true

System Attribute Extension

You can add system properties configuration to the application.

runProperties

Attribute:on task runtime is configured for running properties, following:

iHubBoot {
    runProperties = [
        'spring.profiles.active': 'dev'
    ]
}

runIncludePropNames

Running with system property name (``separated, supported wildcard*):used to configure the specified system properties, andrunPropertiesmutually exclusive configured, following:

iHubBoot {
    runIncludePropNames = 'xxx,abc*'
}

runSkippedPropNames

Exclude system property name on runtime (,separated, supported wildcard*):used to exclude system properties, configuration below:

iHubBoot {
    runSkippedPropNames = 'xxx,abc*'
}

EnabledLocalProperties

Local properties:can be configured at the root of the project.java-local.propertiesAttribute files, enabling the properties to add the configuration in the property file as follows:

gradle.propertiesconfiguration

iHubBoot {
    enabledLocalProperties = true
}

.java-local.propertiesConfiguration

spring.profiles.active=dev

Another property file supports.boot-java-local.propertiesand.test-java-local.properties, extensionbootRunandtestattributes, priority is higher than.java-local.properties