All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cds.feature.cloudfoundry.CloudFoundryEnvironmentConfiguration Maven / Gradle / Ivy

There is a newer version: 3.4.1
Show newest version
/**************************************************************************
 * (C) 2019-2024 SAP SE or an SAP affiliate company. All rights reserved. *
 **************************************************************************/
package com.sap.cds.feature.cloudfoundry;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sap.cds.services.runtime.CdsRuntimeConfiguration;
import com.sap.cds.services.runtime.CdsRuntimeConfigurer;
import com.sap.cds.services.utils.environment.VcapApplicationParser;

public class CloudFoundryEnvironmentConfiguration implements CdsRuntimeConfiguration {

	private final static Logger logger = LoggerFactory.getLogger(CloudFoundryEnvironmentConfiguration.class);

	@Override
	public void environment(CdsRuntimeConfigurer configurer) {
		if(System.getenv(VcapApplicationParser.VCAP_APPLICATION) != null) {
			logger.info("Loaded feature 'Cloud Foundry Platform Environment'");
			configurer.environment(new CloudFoundryApplicationInfoProvider());
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy