public class CloudFoundryAppNameGenerator extends Object implements AppNameGenerator, org.springframework.beans.factory.InitializingBean
AppNameGenerator. This takes into account the
configuration properties enableRandomAppNamePrefix and appNamePrefix.
If enableRandomAppNamePrefix a random adjective and noun are prefixed to the base name.
It is true by default. If appNamePrefix is set, it is also prefixed before the random adjective and noun.
By default the appNamePrefix is the value of spring.application.name if available,
otherwise the empty string.
As an example, if enableRandomAppNamePrefix=true, spring.application.name=server,
and we are deploying an application whose base name is time, then the deployed name on Cloud Foundry
will be server-unfarming-restabilization-time| Constructor and Description |
|---|
CloudFoundryAppNameGenerator(CloudFoundryDeployerProperties cloudFoundryDeployerProperties,
WordListRandomWords wordListRandomWords) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
String |
generateAppName(String appName)
Generate an application name given a base name as the starting point.
|
public CloudFoundryAppNameGenerator(CloudFoundryDeployerProperties cloudFoundryDeployerProperties, WordListRandomWords wordListRandomWords)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic String generateAppName(String appName)
AppNameGeneratorgenerateAppName in interface AppNameGeneratorappName - base application nameCopyright © 2016 Pivotal Software, Inc.. All rights reserved.