Package io.spring.initializr.metadata
Class InitializrConfiguration
java.lang.Object
io.spring.initializr.metadata.InitializrConfiguration
- Direct Known Subclasses:
InitializrProperties
Various configuration options used by the service.
- Author:
- Stephane Nicoll, Chris Bono, Moritz Halbritter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Defines additional environment settings.static class
Platform-specific settings. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncleanPackageName
(String packageName, String defaultPackageName) Clean the specified package name if necessary.Generate a suitable application name based on the specified name.getEnv()
void
merge
(InitializrConfiguration other) void
validate()
-
Constructor Details
-
InitializrConfiguration
public InitializrConfiguration()
-
-
Method Details
-
getEnv
-
validate
public void validate() -
merge
-
generateApplicationName
Generate a suitable application name based on the specified name. If no suitable application name can be generated from the specifiedname
, theInitializrConfiguration.Env.getFallbackApplicationName()
is used instead.No suitable application name can be generated if the name is
null
or if it contains an invalid character for a class identifier.- Parameters:
name
- the the source name- Returns:
- the generated application name
- See Also:
-
cleanPackageName
Clean the specified package name if necessary. If the package name cannot be transformed to a valid package name, thedefaultPackageName
is used instead.The package name cannot be cleaned if the specified
packageName
isnull
or if it contains an invalid character for a class identifier.- Parameters:
packageName
- the package namedefaultPackageName
- the default package name- Returns:
- the cleaned package name
- See Also:
-