T
- the type of a sub-classpublic abstract class AbstractClientApplication<R,T extends AbstractClientApplication<R,T>> extends java.lang.Object implements ClientApplicationRunner<R>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
applicationBaseDir |
protected java.lang.String |
applicationVersion |
protected java.util.Properties |
appProperties |
protected java.util.List<java.lang.String> |
profiles |
protected java.util.List<java.lang.Object> |
sources |
Constructor and Description |
---|
AbstractClientApplication() |
Modifier and Type | Method and Description |
---|---|
T |
applicationBaseDir(java.lang.String applicationBaseDir)
Sets an Applications base directory to be used by a builder.
|
T |
applicationVersion(java.lang.String applicationVersion)
Sets an application version to be used by a builder.
|
T |
appProperties(java.util.Properties appProperties)
Sets application properties which will be passed into a Spring Boot
environment.
|
protected abstract T |
getThis()
Gets the instance of this defined by a sub-class.
|
T |
profiles(java.lang.String... profiles)
Sets an additional profiles to be used when running
an
SpringApplication . |
R |
run()
Run the application.
|
abstract R |
run(java.lang.String... args)
Run the application.
|
T |
sources(java.lang.Object... sources)
Sets an additional sources to by used when running
an
SpringApplication . |
protected java.lang.String applicationVersion
protected java.lang.String applicationBaseDir
protected java.util.List<java.lang.Object> sources
protected java.util.List<java.lang.String> profiles
protected java.util.Properties appProperties
public R run()
ClientApplicationRunner
run
in interface ClientApplicationRunner<R>
public abstract R run(java.lang.String... args)
ClientApplicationRunner
run
in interface ClientApplicationRunner<R>
args
- the application argumentspublic T applicationVersion(java.lang.String applicationVersion)
applicationVersion
- the application versionpublic T applicationBaseDir(java.lang.String applicationBaseDir)
applicationBaseDir
- the applications base directorypublic T sources(java.lang.Object... sources)
SpringApplication
.sources
- the additional sources for Spring Applicationpublic T profiles(java.lang.String... profiles)
SpringApplication
.profiles
- the additional profiles for Spring Applicationpublic T appProperties(java.util.Properties appProperties)
Effectively this means that these properties allow to override all
existing properties but still doesn't override properties based on
command-line arguments. Command-line arguments in this context are the
ones passed to run
method in a sub-class.
appProperties
- the app propertiesprotected abstract T getThis()