@Override
    public Properties load() {
        final Path defaultConfigPath = this.agentRootPath.resolve(ProfileConstants.CONFIG_FILE_NAME);

        final Properties defaultProperties = new Properties();
        // 1. load default Properties
        logger.info(String.format("load default config:%s", defaultConfigPath));
        defaultProperties.putAll(PropertyLoaderUtils.loadFileProperties(defaultConfigPath));

        // 2. load profile
        final String activeProfile = getActiveProfile(defaultProperties);
        logger.info(String.format("active profile:%s", activeProfile));

        final Path profilePath = Paths.get(profilesPath.toString(), activeProfile, ProfileConstants.PROFILE_CONFIG_FILE_NAME);
        logger.info(String.format("load profile:%s", profilePath));
        defaultProperties.putAll(PropertyLoaderUtils.loadFileProperties(profilePath));

        defaultProperties.setProperty(ProfileConstants.ACTIVE_PROFILE_KEY, activeProfile);

        // 3. load external config
        final String externalConfig = this.javaSystemProperty.getProperty(ProfileConstants.EXTERNAL_CONFIG_KEY);
        if (externalConfig != null) {
            logger.info(String.format("load external config:%s", externalConfig));
            defaultProperties.putAll(PropertyLoaderUtils.loadFileProperties(Paths.get(externalConfig)));
        }

        // 4 OS environment variables
        loadProperties(defaultProperties, this.osEnvProperty);

        // 5. Java System Properties -Dkey=value
        loadProperties(defaultProperties, this.javaSystemProperty);

        // root path
        saveAgentRootPath(agentRootPath, defaultProperties);

        // log path
        return defaultProperties;
    }
<pre>Configuration order</pre>

<p> Same order as Spring-Boot </p>
<p>
    <a href="https://docs.spring.io/spring-boot/docs/2.1.9.RELEASE/reference/html/boot-features-external-config.html">
        boot-features-external-config
    </a>
</p>
<ol>
    <li>Java System properties</li>
    <li>OS environment variables</li>
    <li>agent external configuration</li>
    <li>agent profile configuration /profiles/${profile}/pinpoint.config</li>
    <li>agent config /pinpoint-env.config</li>
</ol>
agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/ProfilePropertyLoader.java